NetBSD/sys/netns
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
..
Makefile
idp.h
idp_usrreq.c
idp_var.h
ns.c
ns.h
ns_cksum.c
ns_error.c
ns_error.h
ns_if.h
ns_input.c
ns_ip.c
ns_output.c
ns_pcb.c
ns_pcb.h
ns_proto.c
ns_var.h
sp.h
spidp.h
spp_debug.c
spp_debug.h
spp_timer.h
spp_usrreq.c
spp_var.h