Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Jul 2005 02:47:38 +0200
From:      Dan Lukes <dan@obluda.cz>
To:        Yar Tikhiy <yar@FreeBSD.org>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/81978: [ PATCH ] if_vlan didn't pass the ALLMULTI to the parent interface
Message-ID:  <42C5E42A.9000407@obluda.cz>
In-Reply-To: <20050629130127.GA51085@comp.chem.msu.su>
References:  <200506141202.j5EC28O7026407@freefall.freebsd.org> <20050629130127.GA51085@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
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@obluda.cz, dan@freebsd.cz,dan@kolej.mff.cuni.cz




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