diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-06 21:52:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-06 21:52:01 +0000 |
commit | 6277c53fbc03d39a85159c612ab8c24d6faad7cc (patch) | |
tree | 839496c40938f15df45b01e09c05f1e4dddee3bc /sys/netinet/if_ether.c | |
parent | 046f0556dc61807b9d6a98972d4d673a623edeae (diff) |
Do not panic in arpintr() if IF_DEQUEUE returns NULL, this is perfectly legal
and can happen on slow mp systems under a lot of network load; ok kettenis@
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r-- | sys/netinet/if_ether.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index faebe8516f3..fa9e562331e 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.68 2007/03/25 16:43:22 claudio Exp $ */ +/* $OpenBSD: if_ether.c,v 1.69 2007/11/06 21:52:00 miod Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -473,8 +473,12 @@ arpintr() s = splnet(); IF_DEQUEUE(&arpintrq, m); splx(s); - if (m == 0 || (m->m_flags & M_PKTHDR) == 0) + if (m == NULL) + break; +#ifdef DIAGNOSTIC + if ((m->m_flags & M_PKTHDR) == 0) panic("arpintr"); +#endif len = sizeof(struct arphdr); if (m->m_len < len && (m = m_pullup(m, len)) == NULL) |