cvs commit: src/sys/net if.c if_var.h src/sys/netinet in.c in_var.h
brian at FreeBSD.org
Sat Jul 7 00:54:47 UTC 2007
brian 2007-07-07 00:54:47 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_6)
sys/net if.c if_var.h
sys/netinet in.c in_var.h
Fix a problem introduced in netinet/in.c 188.8.131.52 where
in_ifdetach() calls in_delmulti_ifp().
The code now *really* deletes the elements in in_multihead
for the ifp that's going away (rather than just decrementing
the reference count). Previously we were left with inm and
ifma structures containing bogus ifnet pointers after
destroying an interface that had more than one IP4 assignment
made to it in it's lifetime.
I've also added a if_delmulti_ent() to make deleting known
ifma structures possible rather than depending on
if_findmulti() to end up finding the same thing. It
will in fact always find the correct ifma *unless* the
passed sockaddr has a bogus sa_len of zero.
Finally, when adding a multicast address, we no longer
increment the refcount (well, we do, but then we decrement
it again). The refcount here is in fact bogus so hopefully
readers will see that now.
This code is going directly into -stable as it has been
rewritten in -current and those changes are deemed too
intrusive for -stable consumption right now.
Reviewed by: bms
Revision Changes Path
184.108.40.206 +32 -11 src/sys/net/if.c
220.127.116.11 +1 -0 src/sys/net/if_var.h
18.104.22.168 +28 -22 src/sys/netinet/in.c
22.214.171.124 +0 -1 src/sys/netinet/in_var.h
More information about the cvs-src