refresh default router list on nd6_purge(), only if we are an

autoconfigured host.

Obtained from:	KAME
This commit is contained in:
ume 2001-06-27 17:56:17 +00:00
parent 456c123190
commit 6c95672334

View File

@ -762,10 +762,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.