Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/nd6.c
Show First 20 Lines • Show All 1,780 Lines • ▼ Show 20 Lines | case SIOCSPFXFLUSH_IN6: | ||||
struct in6_ifaddr *ia, *ia_next; | struct in6_ifaddr *ia, *ia_next; | ||||
struct nd_prefix *pr, *next; | struct nd_prefix *pr, *next; | ||||
struct nd_prhead prl; | struct nd_prhead prl; | ||||
LIST_INIT(&prl); | LIST_INIT(&prl); | ||||
ND6_WLOCK(); | ND6_WLOCK(); | ||||
LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { | LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { | ||||
if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) | if (pr->ndpr_raf_ra_derived) | ||||
continue; /* XXX */ | |||||
nd6_prefix_unlink(pr, &prl); | nd6_prefix_unlink(pr, &prl); | ||||
} | } | ||||
ND6_WUNLOCK(); | ND6_WUNLOCK(); | ||||
while ((pr = LIST_FIRST(&prl)) != NULL) { | while ((pr = LIST_FIRST(&prl)) != NULL) { | ||||
LIST_REMOVE(pr, ndpr_entry); | LIST_REMOVE(pr, ndpr_entry); | ||||
/* XXXRW: in6_ifaddrhead locking. */ | /* XXXRW: in6_ifaddrhead locking. */ | ||||
CK_STAILQ_FOREACH_SAFE(ia, &V_in6_ifaddrhead, ia_link, | CK_STAILQ_FOREACH_SAFE(ia, &V_in6_ifaddrhead, ia_link, | ||||
ia_next) { | ia_next) { | ||||
▲ Show 20 Lines • Show All 857 Lines • ▼ Show 20 Lines | nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) | ||||
bzero(&p, sizeof(p)); | bzero(&p, sizeof(p)); | ||||
p.origin = PR_ORIG_RA; | p.origin = PR_ORIG_RA; | ||||
bzero(&s6, sizeof(s6)); | bzero(&s6, sizeof(s6)); | ||||
s6.sin6_family = AF_INET6; | s6.sin6_family = AF_INET6; | ||||
s6.sin6_len = sizeof(s6); | s6.sin6_len = sizeof(s6); | ||||
ND6_RLOCK(); | ND6_RLOCK(); | ||||
LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { | LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { | ||||
if (!pr->ndpr_raf_ra_derived) | |||||
continue; | |||||
p.prefix = pr->ndpr_prefix; | p.prefix = pr->ndpr_prefix; | ||||
if (sa6_recoverscope(&p.prefix)) { | if (sa6_recoverscope(&p.prefix)) { | ||||
log(LOG_ERR, "scope error in prefix list (%s)\n", | log(LOG_ERR, "scope error in prefix list (%s)\n", | ||||
ip6_sprintf(ip6buf, &p.prefix.sin6_addr)); | ip6_sprintf(ip6buf, &p.prefix.sin6_addr)); | ||||
/* XXX: press on... */ | /* XXX: press on... */ | ||||
} | } | ||||
p.raflags = pr->ndpr_raf; | p.raflags = pr->ndpr_raf; | ||||
p.prefixlen = pr->ndpr_plen; | p.prefixlen = pr->ndpr_plen; | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |