Author: jhb Date: Fri Aug 6 15:15:26 2010 New Revision: 210937 URL: http://svn.freebsd.org/changeset/base/210937
Log: Adjust the interface type in the link layer socket address for vlan(4) interfaces to be a vlan (IFT_L2VLAN) rather than an Ethernet interface (IFT_ETHER). The code already fixed if_type in the ifnet causing some places to report the interface as a vlan (e.g. arp -a output) and other places to report the interface as Ethernet (getifaddrs(3)). Now they should all report IFT_L2VLAN. Reviewed by: brooks MFC after: 1 month Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Fri Aug 6 15:09:21 2010 (r210936) +++ head/sys/net/if_vlan.c Fri Aug 6 15:15:26 2010 (r210937) @@ -688,6 +688,8 @@ vlan_clone_create(struct if_clone *ifc, struct ifvlan *ifv; struct ifnet *ifp; struct ifnet *p; + struct ifaddr *ifa; + struct sockaddr_dl *sdl; struct vlanreq vlr; static const u_char eaddr[ETHER_ADDR_LEN]; /* 00:00:00:00:00:00 */ @@ -786,6 +788,9 @@ vlan_clone_create(struct if_clone *ifc, ifp->if_baudrate = 0; ifp->if_type = IFT_L2VLAN; ifp->if_hdrlen = ETHER_VLAN_ENCAP_LEN; + ifa = ifp->if_addr; + sdl = (struct sockaddr_dl *)ifa->ifa_addr; + sdl->sdl_type = IFT_L2VLAN; if (ethertag) { error = vlan_config(ifv, p, tag); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"