From 185e54d3f4d0c3c697dc9bc49e2b90073cb55d5d Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Wed, 27 Jun 2001 17:51:40 +0000 Subject: do not try to update ipv6 default route if i'm not an autoconfigured host, on nd6_detach (= interface removal). --- sys/netinet6/nd6.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys') 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. -- cgit v1.2.3