diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2011-04-03 13:55:37 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2011-04-03 13:55:37 +0000 |
commit | fb34e9e6ec75598d9717cf0cb3aec9146fd54cca (patch) | |
tree | 2caa37e2ed8af3b059bb4f5e171c46a143439f17 /sys/netinet6 | |
parent | 06524b6eaf6ef7715d3e297c89df6dcdc04cfc2d (diff) |
As of r1.54 of nd6_rtr.c we don't add addresses from interrupt context
anymore so the allocation in in6_update_ifa() can now wait.
ok deraadt henning
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 4bbdc9aa424..141f2a479b7 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.89 2010/10/07 22:07:06 mpf Exp $ */ +/* $OpenBSD: in6.c,v 1.90 2011/04/03 13:55:36 stsp Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -910,14 +910,7 @@ in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra, */ if (ia == NULL) { hostIsNew = 1; - /* - * When in6_update_ifa() is called in a process of a received - * RA, it is called under an interrupt context. So, we should - * call malloc with M_NOWAIT. - */ - ia = malloc(sizeof(*ia), M_IFADDR, M_NOWAIT | M_ZERO); - if (ia == NULL) - return (ENOBUFS); + ia = malloc(sizeof(*ia), M_IFADDR, M_WAITOK | M_ZERO); LIST_INIT(&ia->ia6_memberships); /* Initialize the address and masks, and put time stamp */ ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; |