summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-06-27 17:51:40 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-06-27 17:51:40 +0000
commit185e54d3f4d0c3c697dc9bc49e2b90073cb55d5d (patch)
treeb2b14cb9064349a4b576e7c57d13a1e70ed3599d /sys
parentf471e1f6090cc8838e757628be93dbf100d03b73 (diff)
do not try to update ipv6 default route if i'm not an autoconfigured host,
on nd6_detach (= interface removal).
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/nd6.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index bc43199e18c..636939c1fed 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.35 2001/06/22 14:12:36 itojun Exp $ */
+/* $OpenBSD: nd6.c,v 1.36 2001/06/27 17:51:39 itojun Exp $ */
/* $KAME: nd6.c,v 1.151 2001/06/19 14:24:41 sumikawa Exp $ */
/*
@@ -618,10 +618,12 @@ nd6_purge(ifp)
if (nd6_defifindex == ifp->if_index)
nd6_setdefaultiface(0);
- /* refresh default router list */
- bzero(&drany, sizeof(drany));
- defrouter_delreq(&drany, 0);
- defrouter_select();
+ if (!ip6_forwarding && ip6_accept_rtadv) { /* XXX: too restrictive? */
+ /* refresh default router list */
+ bzero(&drany, sizeof(drany));
+ defrouter_delreq(&drany, 0);
+ defrouter_select();
+ }
/*
* Nuke neighbor cache entries for the ifp.