Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/in6.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/in6.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.32 retrieving revision 1.32.4.1 diff -u -p -r1.32 -r1.32.4.1 --- src/sys/netinet6/in6.c 2000/04/27 16:44:19 1.32 +++ src/sys/netinet6/in6.c 2000/07/13 14:59:50 1.32.4.1 @@ -1,5 +1,5 @@ -/* $NetBSD: in6.c,v 1.32 2000/04/27 16:44:19 itojun Exp $ */ -/* $KAME: in6.c,v 1.75 2000/04/12 03:51:29 itojun Exp $ */ +/* $NetBSD: in6.c,v 1.32.4.1 2000/07/13 14:59:50 itojun Exp $ */ +/* $KAME: in6.c,v 1.99 2000/07/11 17:00:58 jinmei Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -174,7 +174,7 @@ in6_ifloop_request(int cmd, struct ifadd { struct sockaddr_in6 lo_sa; struct sockaddr_in6 all1_sa; - struct rtentry *nrt = NULL; + struct rtentry *nrt = NULL, **nrtp = NULL; bzero(&lo_sa, sizeof(lo_sa)); bzero(&all1_sa, sizeof(all1_sa)); @@ -184,11 +184,17 @@ in6_ifloop_request(int cmd, struct ifadd lo_sa.sin6_addr = in6addr_loopback; all1_sa.sin6_addr = in6mask128; - /* So we add or remove static loopback entry, here. */ + /* + * So we add or remove static loopback entry, here. + * This request for deletion could fail, e.g. when we remove + * an address right after adding it. + */ + if (cmd == RTM_ADD) + nrtp = &nrt; rtrequest(cmd, ifa->ifa_addr, (struct sockaddr *)&lo_sa, (struct sockaddr *)&all1_sa, - RTF_UP|RTF_HOST, &nrt); + RTF_UP|RTF_HOST, nrtp); /* * Make sure rt_ifa be equal to IFA, the second argument of the