Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if.c
Show First 20 Lines • Show All 1,011 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Remove any unicast or broadcast network addresses from an interface. | * Remove any unicast or broadcast network addresses from an interface. | ||||
*/ | */ | ||||
void | void | ||||
if_purgeaddrs(struct ifnet *ifp) | if_purgeaddrs(struct ifnet *ifp) | ||||
{ | { | ||||
struct ifaddr *ifa; | struct ifaddr *ifa; | ||||
#ifdef INET6 | |||||
/* | |||||
* Need to leave multicast addresses of proxy NDP llentries | |||||
* before in6_purgeifaddr() because the llentries are keys | |||||
* for in6_multi objects of proxy NDP entries. | |||||
* in6_purgeifaddr()s clean up llentries including proxy NDPs | |||||
* then we would lose the keys if they are called earlier. | |||||
*/ | |||||
in6_purge_proxy_ndp(ifp); | |||||
#endif | |||||
while (1) { | while (1) { | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
NET_EPOCH_ENTER(et); | NET_EPOCH_ENTER(et); | ||||
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { | CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { | ||||
if (ifa->ifa_addr->sa_family != AF_LINK) | if (ifa->ifa_addr->sa_family != AF_LINK) | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,749 Lines • Show Last 20 Lines |