Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_ifattach.c
Show First 20 Lines • Show All 768 Lines • ▼ Show 20 Lines | _in6_ifdetach(struct ifnet *ifp, int purgeulp) | ||||
* nuke any of IPv6 addresses we have | * nuke any of IPv6 addresses we have | ||||
*/ | */ | ||||
CK_STAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) { | CK_STAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, next) { | ||||
if (ifa->ifa_addr->sa_family != AF_INET6) | if (ifa->ifa_addr->sa_family != AF_INET6) | ||||
continue; | continue; | ||||
in6_purgeaddr(ifa); | in6_purgeaddr(ifa); | ||||
} | } | ||||
if (purgeulp) { | if (purgeulp) { | ||||
IN6_MULTI_LOCK(); | |||||
in6_pcbpurgeif0(&V_udbinfo, ifp); | in6_pcbpurgeif0(&V_udbinfo, ifp); | ||||
in6_pcbpurgeif0(&V_ulitecbinfo, ifp); | in6_pcbpurgeif0(&V_ulitecbinfo, ifp); | ||||
in6_pcbpurgeif0(&V_ripcbinfo, ifp); | in6_pcbpurgeif0(&V_ripcbinfo, ifp); | ||||
IN6_MULTI_UNLOCK(); | |||||
} | } | ||||
/* leave from all multicast groups joined */ | /* leave from all multicast groups joined */ | ||||
in6_purgemaddrs(ifp); | in6_purgemaddrs(ifp); | ||||
/* | /* | ||||
* Remove neighbor management table. | * Remove neighbor management table. | ||||
* Enabling the nd6_purge will panic on vmove for interfaces on VNET | * Enabling the nd6_purge will panic on vmove for interfaces on VNET | ||||
* teardown as the IPv6 layer is cleaned up already and the locks | * teardown as the IPv6 layer is cleaned up already and the locks | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |