Date: Thu, 25 Oct 2007 23:41:38 +0200 From: Jon Otterholm <jon.otterholm@ide.resurscentrum.se> To: freebsd-net@freebsd.org Cc: Andrew Thompson <thompsa@FreeBSD.org> Subject: QinQ Message-ID: <47210D92.1050403@ide.resurscentrum.se>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000608080205010905040602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi. I was wondering about the possibility of adding support for QinQ ("Double tagged frames" / "Nested vlans"). Attached is a patch against -STABLE to add this support. I have not tested this but was told it should work. Would it be possible to get this into CURRENT? //Jon --------------000608080205010905040602 Content-Type: text/plain; name="if_vlan.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_vlan.c.patch" --- if_vlan.c.orig 2006-10-17 14:24:18.000000000 +0700 +++ if_vlan.c 2007-09-14 14:00:44.000000000 +0700 @@ -327,7 +327,8 @@ /* Check for <etherif>.<vlan> style interface names. */ IFNET_RLOCK(); TAILQ_FOREACH(ifp, &ifnet, if_link) { - if (ifp->if_type != IFT_ETHER) + if (ifp->if_type != IFT_ETHER && + ifp->if_type != IFT_L2VLAN) continue; if (strncmp(ifp->if_xname, name, strlen(ifp->if_xname)) != 0) continue; @@ -672,6 +673,7 @@ mtag = NULL; switch (ifp->if_type) { case IFT_ETHER: + case IFT_L2VLAN: if (m->m_len < sizeof(*evl) && (m = m_pullup(m, sizeof(*evl))) == NULL) { if_printf(ifp, "cannot pullup VLAN header\n"); @@ -748,8 +750,9 @@ VLAN_LOCK_ASSERT(); - if (p->if_type != IFT_ETHER) - return (EPROTONOSUPPORT); + if ((p->if_data.ifi_type != IFT_ETHER) && + (p->if_data.ifi_type != IFT_L2VLAN)) + return (EPROTONOSUPPORT); if ((p->if_flags & VLAN_IFFLAGS) != VLAN_IFFLAGS) return (EPROTONOSUPPORT); if (ifv->ifv_p) --------------000608080205010905040602--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47210D92.1050403>