K 10 svn:author V 7 glebius K 8 svn:date V 27 2015-03-25T14:36:17.693635Z K 7 svn:log V 921 In the head network stack an interface ifp->if_addrlen always matches ((struct sockaddr_dl *)ifp->if_addr->ifa_addr))->sdl_alen. We can use either to determine interface address length. In the projects/ifnet, the if_addrlen moves to ifdrv_addrlen, being the same for all instances of a certain driver. However, the vlan(4) driver theoretically may have different address length on different instances. We've got code in vlan(4) that allows it to run on infiniband. o Change if_addrlen() to return sdl_alen of hardware address instead of ifdrv_addrlen. o Generalize setup of ifa_addr. Set up sdl->sdl_alen and copy the link level address in the if_attach(), instead of doing that in ether_ifattach/arc_ifattch/whatever_ifattach. o Make ifat_lla an optional argument. An interface may not know its address at creation time, thus it will have address of all zeroes. Sponsored by: Netflix Sponsored by: Nginx, Inc. END