so, vlan: -calls ether_ifattach, which, last not least, sets if_type to IFT_ETHER -right after set if_type to IFT_L2VLAN -just to set it to if_ether again as soon as it gets configured (parents can only be IFT_ETHER)
that is... pointless. fwiw, this was the one and only use of IFT_L2VLAN in the entire kernel. the question in the comment has been answered by the last 13 years. ok? Index: net/if_vlan.c =================================================================== RCS file: /cvs/src/sys/net/if_vlan.c,v retrieving revision 1.103 diff -u -p -r1.103 if_vlan.c --- net/if_vlan.c 22 Apr 2014 11:43:07 -0000 1.103 +++ net/if_vlan.c 1 May 2014 19:49:50 -0000 @@ -151,8 +151,6 @@ vlan_clone_create(struct if_clone *ifc, IFQ_SET_READY(&ifp->if_snd); if_attach(ifp); ether_ifattach(ifp); - /* Now undo some of the damage... */ - ifp->if_type = IFT_L2VLAN; ifp->if_hdrlen = EVL_ENCAPLEN; ifp->if_output = vlan_output; @@ -374,12 +372,6 @@ vlan_config(struct ifvlan *ifv, struct i } /* - * Inherit the if_type from the parent. This allows us to - * participate in bridges of that type. - */ - ifv->ifv_if.if_type = p->if_type; - - /* * Inherit baudrate from the parent. An SNMP agent would use this * information. */ @@ -392,9 +384,6 @@ vlan_config(struct ifvlan *ifv, struct i * * If the card cannot handle hardware tagging, it cannot * possibly compute the correct checksums for tagged packets. - * - * This brings up another possibility, do cards exist which - * have all of these capabilities but cannot utilize them together? */ if (p->if_capabilities & IFCAP_VLAN_HWTAGGING) ifv->ifv_if.if_capabilities = p->if_capabilities & -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/