diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-04-24 16:43:00 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-04-24 16:43:00 +0000 |
commit | 785a8619f7687670e72618ee146902fc4cf704e5 (patch) | |
tree | 590237f5ff91407f86f71b55dd919a13345df6d8 /sys/net/if.c | |
parent | 0df7142d581d644ed97e66b376104baf08bbfd1c (diff) |
Initialize if_addrhooks in if_attachhead() like in if_attach(), either
one may be called.
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 680be3afd9b..107850024f8 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.52 2002/04/24 00:51:51 dhartmei Exp $ */ +/* $OpenBSD: if.c,v 1.53 2002/04/24 16:42:59 dhartmei Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -248,6 +248,10 @@ if_attachhead(ifp) if (if_index == 0) TAILQ_INIT(&ifnet); TAILQ_INIT(&ifp->if_addrlist); + ifp->if_addrhooks = malloc(sizeof(*ifp->if_addrhooks), M_TEMP, M_NOWAIT); + if (ifp->if_addrhooks == NULL) + panic("if_attachhead: malloc"); + TAILQ_INIT(ifp->if_addrhooks); TAILQ_INSERT_HEAD(&ifnet, ifp, if_list); if_attachsetup(ifp); } |