kern/81978: [ PATCH ] if_vlan didn't pass the ALLMULTI to the
parent interface
Dan Lukes
dan at obluda.cz
Tue Jun 7 07:40:30 GMT 2005
>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:
More information about the freebsd-bugs
mailing list