From fb34e9e6ec75598d9717cf0cb3aec9146fd54cca Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Sun, 3 Apr 2011 13:55:37 +0000 Subject: 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 --- sys/netinet6/in6.c | 11 ++--------- 1 file 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; -- cgit v1.2.3