kern/81978: [ PATCH ] if_vlan didn't pass the ALLMULTI to the
parent interface
Dan Lukes
dan at obluda.cz
Sat Jul 2 00:47:42 GMT 2005
Yar Tikhiy napsal/wrote, On 06/29/05 15:01:
> Would you mind testing the following patch in 5-STABLE? I tried to reduce code duplication since the cases of promiscuous and all-multi modes are very close. Thanks!
It work. Well, there may be some unresolved problem - we shoult clear
the ALLMULTI and PROMISC flags when interface is destroyed. The
vlan_unconfig() seems to be best place for it.
> Apropos, how do you turn on all-multicast mode on an interface? It doesn't seem possible from the userland using ioctl(2).
setsockopt(s, IPPROTO_IP, MRT_ADD_VIF, ...)
Well, the 'parent' interface must have an IP address configured in - so
I configured 127.0.0.5/32 to parent interface.
===============
Unfortunatelly, there is one more big problem with VLAN interface and
MROUTING that hasn't been adressed by this PR and patch.
ip_mroute code isn't informed about destroying of an interface. Later
reference of destroyed interface cause kernel abend.
Let add an vlanX interface as vif (using MRT_ADD_VIF), then destroy it.
Nothing bad happens untill we call MRT_DEL_VIF. The ip_mroute.c code
cache ifp within it's viftable[] despite of interface destroying. Call
of MRT_DEL_VIF reference free memory and kernel abends.
The 'if_detach' of if.c should notify the ip_mroute module about
destroying of interface so ip_mroute code can safely deinitialize
interface and remove references to it from it's internal structures.
We need something similar to carp_ifdetach(ifp) function of carp module
which is called from if_detach.
Well, this problem is not so related to VLAN module - it's problem of
any detachable multicast capable interface.
I should send separate PR unless you patch it also ...
Dan
--
Dan Lukes SISAL MFF UK
AKA: dan at obluda.cz, dan at freebsd.cz,dan at kolej.mff.cuni.cz
More information about the freebsd-bugs
mailing list