diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index c5238cfc7ef6..34f820d6291e 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -530,11 +530,13 @@ arpintr(struct mbuf *m) return; } - if (m->m_pkthdr.len < arphdr_len(ar) && - (m = m_pullup(m, arphdr_len(ar))) == NULL) { - log(LOG_ERR, "arp: runt packet\n"); - m_freem(m); - return; + if (m->m_pkthdr.len < arphdr_len(ar)) { + if ((m = m_pullup(m, arphdr_len(ar))) == NULL) { + log(LOG_ERR, "arp: runt packet\n"); + m_freem(m); + return; + } + ar = mtod(m, struct arphdr *); } switch (ntohs(ar->ar_pro)) {