Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6.c
Show First 20 Lines • Show All 643 Lines • ▼ Show 20 Lines | if ((pr = nd6_prefix_lookup(&pr0)) == NULL) { | ||||
goto out; | goto out; | ||||
} | } | ||||
} | } | ||||
/* relate the address to the prefix */ | /* relate the address to the prefix */ | ||||
if (ia->ia6_ndpr == NULL) { | if (ia->ia6_ndpr == NULL) { | ||||
ia->ia6_ndpr = pr; | ia->ia6_ndpr = pr; | ||||
pr->ndpr_addrcnt++; | pr->ndpr_addrcnt++; | ||||
if (ia->ia6_flags & IN6_IFF_AUTOCONF) | |||||
pr->ndpr_num_autoconf_addrs++; | |||||
/* | /* | ||||
* If this is the first autoconf address from the | * If this is the first autoconf address from the | ||||
* prefix, create a temporary address as well | * prefix, create a temporary address as well | ||||
* (when required). | * (when required). | ||||
*/ | */ | ||||
if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && | if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && | ||||
V_ip6_use_tempaddr && pr->ndpr_addrcnt == 1) { | V_ip6_use_tempaddr && pr->ndpr_addrcnt == 1) { | ||||
▲ Show 20 Lines • Show All 690 Lines • ▼ Show 20 Lines | in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) | ||||
*/ | */ | ||||
remove_lle = 0; | remove_lle = 0; | ||||
if (ia->ia6_ndpr == NULL) { | if (ia->ia6_ndpr == NULL) { | ||||
nd6log((LOG_NOTICE, | nd6log((LOG_NOTICE, | ||||
"in6_unlink_ifa: autoconf'ed address " | "in6_unlink_ifa: autoconf'ed address " | ||||
"%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); | "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); | ||||
} else { | } else { | ||||
ia->ia6_ndpr->ndpr_addrcnt--; | ia->ia6_ndpr->ndpr_addrcnt--; | ||||
if (ia->ia6_flags & IN6_IFF_AUTOCONF) | |||||
ia->ia6_ndpr->ndpr_num_autoconf_addrs--; | |||||
/* Do not delete lles within prefix if refcont != 0 */ | /* Do not delete lles within prefix if refcont != 0 */ | ||||
if (ia->ia6_ndpr->ndpr_addrcnt == 0) | if (ia->ia6_ndpr->ndpr_addrcnt == 0) | ||||
remove_lle = 1; | remove_lle = 1; | ||||
ia->ia6_ndpr = NULL; | ia->ia6_ndpr = NULL; | ||||
} | } | ||||
nd6_rem_ifa_lle(ia, remove_lle); | nd6_rem_ifa_lle(ia, remove_lle); | ||||
▲ Show 20 Lines • Show All 1,192 Lines • Show Last 20 Lines |