Avoid NULL dereference in arpresolve.
This commit is contained in:
parent
dd2bf8ea67
commit
567145993f
@ -372,8 +372,8 @@ arpresolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
|
||||
if (la->la_asked < V_arp_maxtries)
|
||||
error = EWOULDBLOCK; /* First request. */
|
||||
else
|
||||
error =
|
||||
(rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : EHOSTDOWN;
|
||||
error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ?
|
||||
EHOSTUNREACH : EHOSTDOWN;
|
||||
|
||||
if (renew) {
|
||||
LLE_ADDREF(la);
|
||||
|
Loading…
Reference in New Issue
Block a user