check return from lla_lookup against NULL not zero
This commit is contained in:
parent
56c423b065
commit
688d079b2d
@ -1593,7 +1593,7 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia,
|
||||
ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | LLE_EXCLUSIVE),
|
||||
(struct sockaddr *)&ia->ia_addr);
|
||||
IF_AFDATA_UNLOCK(ifp);
|
||||
if (ln) {
|
||||
if (ln != NULL) {
|
||||
ln->la_expire = 0; /* for IPv6 this means permanent */
|
||||
ln->ln_state = ND6_LLINFO_REACHABLE;
|
||||
LLE_WUNLOCK(ln);
|
||||
|
@ -574,7 +574,7 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
IF_AFDATA_LOCK(ifp);
|
||||
la = lla_lookup(LLTABLE6(ifp), 0, (struct sockaddr *)&sin6_next->sin6_addr);
|
||||
IF_AFDATA_UNLOCK(ifp);
|
||||
if (la)
|
||||
if (la != NULL)
|
||||
LLE_RUNLOCK(la);
|
||||
else {
|
||||
error = EHOSTUNREACH;
|
||||
|
Loading…
Reference in New Issue
Block a user