Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jul 2006 12:03:20 -0700
From:      "Tom Parker" <wiresncode@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Possible inconsistency in the use of in6_delmulti()
Message-ID:  <9050f13e0607181203r610da712kc506507b4f90b77c@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

New to the list here, but fairly familiar with the innards of (at
least an older) version of the fbsd networking code. I'm fortunate in
my ability to run purify on a simulated instance of our ported version
of the networking code.  Purify has picked up a problem that I'm a bit
mystified as how it can be fixed.  It is present in current versions
also, I'm interested in any comments people have (I think ours is 4.4
vintage, but it is hard to tell).

As far as I can tell, in most calling paths when in6_delmulti() is
called, it is done after the in6_multi_mship structure has been
removed from the im6o_memberships list in the relevant PCB.  This
applies to in6_ifdetach(), in6_pcbpurgeif0, ip6_setmoptions()  etc.
However in in6_purgeaddr() in6_delmulti is called straight off.  I'm
not sure if we've violated some usage convention, but purify is
telling me this causes access violations when we then leave the same
group using setsockopt().  in6_purgeaddr is called when we remove the
address from the interface.

This should be possible in a real kernel.  Add a multicast address to
an interface, open a socket and listen to the address, then remove the
address from the interface.

Am I missing something here or is this a nasty problem in both the
kernel and our stack port?

Thanks,
Tom

=================
Tom Parker
tom@wiresncode.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9050f13e0607181203r610da712kc506507b4f90b77c>