diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 2aaa10d4f564..d18ebd85f391 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1097,8 +1097,8 @@ regen_tmpaddr(struct in6_ifaddr *ia6) } /* - * Nuke neighbor cache/prefix/default router management table, right before - * ifp goes away. + * Remove prefix and default router list entries corresponding to ifp. Neighbor + * cache entries are freed in in6_domifdetach(). */ void nd6_purge(struct ifnet *ifp) @@ -1147,14 +1147,6 @@ nd6_purge(struct ifnet *ifp) */ pr->ndpr_refcnt = 0; - /* - * Previously, pr->ndpr_addr is removed as well, - * but I strongly believe we don't have to do it. - * nd6_purge() is only called from in6_ifdetach(), - * which removes all the associated interface addresses - * by itself. - * (jinmei@kame.net 20010129) - */ prelist_remove(pr); } } @@ -1167,14 +1159,6 @@ nd6_purge(struct ifnet *ifp) /* Refresh default router list. */ defrouter_select(); } - - /* XXXXX - * We do not nuke the neighbor cache entries here any more - * because the neighbor cache is kept in if_afdata[AF_INET6]. - * nd6_purge() is invoked by in6_ifdetach() which is called - * from if_detach() where everything gets purged. So let - * in6_domifdetach() do the actual L2 table purging work. - */ } /*