summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/nd6.c')
-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.