diff options
-rw-r--r-- | sys/netinet/if_ether.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index a73af42bbdc..69290aaf997 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.144 2015/02/05 03:01:03 mpi Exp $ */ +/* $OpenBSD: if_ether.c,v 1.145 2015/02/07 04:01:11 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -370,6 +370,15 @@ arpresolve(struct arpcom *ac, struct rtentry *rt0, struct mbuf *m, return (error); } + if ((rt->rt_flags & RTF_LLINFO) == 0) { + log(LOG_DEBUG, "arpresolve: %s: route contains no arp" + " information\n", inet_ntop(AF_INET, + &satosin(rt_key(rt))->sin_addr, addr, + sizeof(addr))); + m_freem(m); + return (EINVAL); + } + la = (struct llinfo_arp *)rt->rt_llinfo; if (la == NULL) log(LOG_DEBUG, "arpresolve: %s: route without link " |