From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 2 00:47:42 2005 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B6E216A41C; Sat, 2 Jul 2005 00:47:42 +0000 (GMT) (envelope-from dan@obluda.cz) Received: from prg.traveller.cz (prg.traveller.cz [193.85.2.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id A423743D48; Sat, 2 Jul 2005 00:47:41 +0000 (GMT) (envelope-from dan@obluda.cz) Received: from [10.11.0.2] (kulesh.obluda.cz [193.179.22.243]) by prg.traveller.cz (8.13.3/8.13.3/prg) with ESMTP id j620lcYG072066 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 2 Jul 2005 02:47:39 +0200 (CEST) Message-ID: <42C5E42A.9000407@obluda.cz> Date: Sat, 02 Jul 2005 02:47:38 +0200 From: Dan Lukes User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050330 MIME-Version: 1.0 To: Yar Tikhiy References: <200506141202.j5EC28O7026407@freefall.freebsd.org> <20050629130127.GA51085@comp.chem.msu.su> In-Reply-To: <20050629130127.GA51085@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/81978: [ PATCH ] if_vlan didn't pass the ALLMULTI to the parent interface X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2005 00:47:42 -0000 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