Hi

Here's ugly patch against in 8.2-RELEASE (see attachment) that
makes vlan nesting possible.

 # ifconfig em0.15 create
 # ifconfig em0.15.18 create

Don't know about possible side effects though.
I suppose it doesn't play well wth bridges etc.

With ng_vlan nesting is also possible, but since 8.0
I had to comment out this node name check in ng_ether.c:

     if ((node = ng_name2noderef(NULL, ifp->if_xname)) != NULL) {
             NG_NODE_UNREF(node);
             return;

Best regards,
Ivan

Tue, 30 Aug 2011 15:01:18 +0200 Kurt Jaeger <li...@opsec.eu> wrote:
Hi!

What about 802.1q VLANs encapsulated in another 802.1q VLAN ?

On FreeBSD 8.1 or 9.0-BETA1:

  ifconfig vlan123 create
  ifconfig vlan123 vlandev em0 vlan 123
  ifconfig vlan400 create
  ifconfig vlan400 vlandev vlan123 vlan 400
------
ifconfig: SIOCSETVLAN: Protocol not supported
------

Any ideas ?

--
p...@opsec.eu            +49 171 3101372                         9 years to go !
#src/sys/net/if_vlan.c
--- if_vlan.c.orig      2010-12-21 23:09:25.000000000 +0600
+++ if_vlan.c   2011-05-31 23:14:55.000000000 +0700
@@ -665,7 +665,7 @@
        /* Check for <etherif>.<vlan> style interface names. */
        IFNET_RLOCK_NOSLEEP();
        TAILQ_FOREACH(ifp, &V_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;
@@ -1045,7 +1045,7 @@
        /* VID numbers 0x0 and 0xFFF are reserved */
        if (tag == 0 || tag == 0xFFF)
                return (EINVAL);
-       if (p->if_type != IFT_ETHER)
+       if (p->if_type != IFT_ETHER && p->if_type != IFT_L2VLAN)
                return (EPROTONOSUPPORT);
        if ((p->if_flags & VLAN_IFFLAGS) != VLAN_IFFLAGS)
                return (EPROTONOSUPPORT);

_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to