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
--- 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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"
  • QinQ Jon Otterholm

Reply via email to