Fix parens in m_pullup() line in arp handling code. The code was

improperly doing the equivalent of (m = (function() == NULL)) instead
    of ((m = function()) == NULL).

    This fixes a NULL pointer dereference panic with runt arp packets.
This commit is contained in:
Matthew Dillon 2000-03-23 18:58:59 +00:00
parent ca04fd5f6f
commit 84365e2bcb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58499

View File

@ -444,7 +444,7 @@ arpintr()
panic("arpintr");
if (m->m_len < sizeof(struct arphdr) &&
(m = m_pullup(m, sizeof(struct arphdr)) == NULL)) {
((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) {
log(LOG_ERR, "arp: runt packet -- m_pullup failed.");
continue;
}