lltable: fix crash introduced in c541bd368f
.
Reported by: cy MFC after: 2 weeks
This commit is contained in:
parent
0d55bc8eb2
commit
f8c1b1a929
@ -2323,6 +2323,7 @@ in6_lltable_lookup(struct lltable *llt, u_int flags,
|
||||
const struct sockaddr *l3addr)
|
||||
{
|
||||
const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)l3addr;
|
||||
int family = flags >> 16;
|
||||
struct llentry *lle;
|
||||
|
||||
IF_AFDATA_LOCK_ASSERT(llt->llt_ifp);
|
||||
@ -2333,13 +2334,13 @@ in6_lltable_lookup(struct lltable *llt, u_int flags,
|
||||
("wrong lle request flags: %#x", flags));
|
||||
|
||||
lle = in6_lltable_find_dst(llt, &sin6->sin6_addr);
|
||||
if (lle == NULL)
|
||||
return (NULL);
|
||||
|
||||
int family = flags >> 16;
|
||||
if (__predict_false(family != AF_INET6))
|
||||
lle = llentry_lookup_family(lle, family);
|
||||
|
||||
if (lle == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (flags & LLE_UNLOCKED)
|
||||
return (lle);
|
||||
|
||||
|
@ -972,7 +972,7 @@ defrouter_select_fib(int fibnum)
|
||||
TAILQ_FOREACH(dr, &V_nd6_defrouter, dr_entry) {
|
||||
NET_EPOCH_ENTER(et);
|
||||
if (selected_dr == NULL && dr->ifp->if_fib == fibnum &&
|
||||
(ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) &&
|
||||
(ln = nd6_lookup(&dr->rtaddr, LLE_SF(AF_INET6, 0), dr->ifp)) &&
|
||||
ND6_IS_LLINFO_PROBREACH(ln)) {
|
||||
selected_dr = dr;
|
||||
defrouter_ref(selected_dr);
|
||||
@ -1814,7 +1814,8 @@ find_pfxlist_reachable_router(struct nd_prefix *pr)
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) {
|
||||
ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp);
|
||||
ln = nd6_lookup(&pfxrtr->router->rtaddr, LLE_SF(AF_INET6, 0),
|
||||
pfxrtr->router->ifp);
|
||||
if (ln == NULL)
|
||||
continue;
|
||||
canreach = ND6_IS_LLINFO_PROBREACH(ln);
|
||||
|
Loading…
Reference in New Issue
Block a user