From owner-freebsd-bugs@FreeBSD.ORG Tue Jun 7 07:40:30 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1451916A41C for ; Tue, 7 Jun 2005 07:40:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B373B43D58 for ; Tue, 7 Jun 2005 07:40:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j577eToF059862 for ; Tue, 7 Jun 2005 07:40:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j577eT11059841; Tue, 7 Jun 2005 07:40:29 GMT (envelope-from gnats) Resent-Date: Tue, 7 Jun 2005 07:40:29 GMT Resent-Message-Id: <200506070740.j577eT11059841@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dan Lukes Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D01C16A41C for ; Tue, 7 Jun 2005 07:32:40 +0000 (GMT) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 706DD43D5C for ; Tue, 7 Jun 2005 07:32:39 +0000 (GMT) (envelope-from dan@kulesh.obluda.cz) Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1]) by kulesh.obluda.cz (8.13.3/8.13.3) with ESMTP id j577WY3g039214; Tue, 7 Jun 2005 09:32:34 +0200 (CEST) (envelope-from dan@kulesh.obluda.cz) Received: (from root@localhost) by kulesh.obluda.cz (8.13.3/8.13.1/Submit) id j577WYHa039213; Tue, 7 Jun 2005 09:32:34 +0200 (CEST) (envelope-from dan) Message-Id: <200506070732.j577WYHa039213@kulesh.obluda.cz> Date: Tue, 7 Jun 2005 09:32:34 +0200 (CEST) From: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: dan@obluda.cz Subject: 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 Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 07:40:30 -0000 >Number: 81978 >Category: kern >Synopsis: [ PATCH ] if_vlan didn't pass the ALLMULTI to the parent interface >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 07 07:40:28 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 5.4-STABLE i386 >Organization: Obludarium >Environment: System: FreeBSD 5.4-STABLE FreeBSD 5.4-STABLE #7: Wed Jun 1 00:34:28 CEST 2005 i386 src/sys/net/if_vlan.c,v 1.73.2.2 2005/01/31 23:26:23 imp >Description: if_vlan didn't pass the ALLMULTI flag to the parent interface, so multicast router daemons can't run correctly (they didn't see IGMP messages for example) >How-To-Repeat: Set IFF_ALLMULTI on an vlan interface, look for flags on it's parent >Fix: The patch bellow use the same technique used on PROMISC mode. The if.c has been prepared for it already, but if_vlan doesn't call the if_allmulti ... Please note the patch has not been tested as my multicast server is version 4 (and I'm set the ALLMULTI on the parent by hand as the workaround) --- sys/net/if_vlan.c.ORIG Tue Feb 1 21:02:01 2005 +++ sys/net/if_vlan.c Tue Jun 7 09:18:53 2005 @@ -98,6 +98,7 @@ #define ifv_mintu ifv_mib.ifvm_mintu #define IFVF_PROMISC 0x01 /* promiscuous mode enabled */ +#define IFVF_ALLMULTI 0x02 /* multicast router mode enabled */ SYSCTL_DECL(_net_link); SYSCTL_NODE(_net_link, IFT_L2VLAN, vlan, CTLFLAG_RW, 0, "IEEE 802.1Q VLAN"); @@ -804,6 +805,24 @@ error = ifpromisc(ifv->ifv_p, 0); if (error == 0) ifv->ifv_flags &= ~IFVF_PROMISC; + } + } + + if ( error != 0 ) + return(error); + + error=0; + if ((ifp->if_flags & IFF_ALLMULTI) != 0) { + if ((ifv->ifv_flags & IFVF_ALLMULTI) == 0) { + error = if_allmulti(ifv->ifv_p, 1); + if (error == 0) + ifv->ifv_flags |= IFVF_ALLMULTI; + } + } else { + if ((ifv->ifv_flags & IFVF_ALLMULTI) != 0) { + error = if_allmulti(ifv->ifv_p, 0); + if (error == 0) + ifv->ifv_flags &= ~IFVF_ALLMULTI; } } >Release-Note: >Audit-Trail: >Unformatted: