diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-30 13:04:37 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-06-30 13:04:37 +0000 |
commit | 4239d6781953c558ebf4fa2010ff23f4630ad217 (patch) | |
tree | d710661406931ea40c38847efa1b70a1495afa74 /sys/net/if_tun.c | |
parent | fd0bfbacd2b21eb3bf2543307b763fe112b060aa (diff) |
allocate sockaddr_dl for ifnet in if_alloc_sadl(), as we don't always know
the size of sockaddr_dl on if_attach() - for instance, see ether_ifattach().
from netbsd. fgs ok
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 3833306d27b..52c6c339ef4 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.42 2002/06/06 21:34:16 provos Exp $ */ +/* $OpenBSD: if_tun.c,v 1.43 2002/06/30 13:04:36 itojun Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -152,6 +152,7 @@ tunattach(n) ifp->if_ibytes = 0; ifp->if_obytes = 0; if_attach(ifp); + if_alloc_sadl(ifp); #if NBPFILTER > 0 bpfattach(&ifp->if_bpf, ifp, DLT_LOOP, sizeof(u_int32_t)); #endif |