diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2010-11-17 18:48:27 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2010-11-17 18:48:27 +0000 |
commit | e35c75bcc4a7d4d60e26a6d4bd607c90a4381db9 (patch) | |
tree | 194e13b8690ebb5cdf631f41ee9fe8e66fddac06 /sys/netinet | |
parent | 5a6e31e6b37e886bb0e63b66c1da80ac3066d2bd (diff) |
move the ifa_add call to in_ifinit() so it is called AFTER the ifaddr
structure is fully set up
tested by many as part of a larger diff, ok claudio dlg sthen krw
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 16554aa1fb2..de99f3644d9 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in.c,v 1.60 2010/01/13 10:45:21 henning Exp $ */ +/* $OpenBSD: in.c,v 1.61 2010/11/17 18:48:26 henning Exp $ */ /* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */ /* @@ -271,7 +271,6 @@ in_control(so, cmd, data, ifp) LIST_INIT(&ia->ia_multiaddrs); if ((ifp->if_flags & IFF_LOOPBACK) == 0) in_interfaces++; - ifa_add(ifp, (struct ifaddr *)ia); splx(s); newifaddr = 1; @@ -729,6 +728,9 @@ in_ifinit(ifp, ia, sin, scrub) addr.s_addr = INADDR_ALLHOSTS_GROUP; ia->ia_allhosts = in_addmulti(&addr, ifp); } + + ifa_add(ifp, (struct ifaddr *)ia); + return (error); } |