summaryrefslogtreecommitdiff
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-30 13:04:37 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-30 13:04:37 +0000
commit4239d6781953c558ebf4fa2010ff23f4630ad217 (patch)
treed710661406931ea40c38847efa1b70a1495afa74 /sys/net/if_tun.c
parentfd0bfbacd2b21eb3bf2543307b763fe112b060aa (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.c3
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