From d2e1152afacae581f169f5a49e870b71494d36ae Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Wed, 13 Jul 2016 16:45:20 +0000 Subject: Move ARP processing back to the KERNEL_LOCK()ed task until the race triggered by updating a cached, but removed from the table, entry is properly fixed. Diff from dlg@, prodding deraadt@ --- sys/net/if.c | 6 +++++- sys/net/netisr.h | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if.c b/sys/net/if.c index a035c440cdd..198251439c5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.435 2016/07/12 09:33:13 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.436 2016/07/13 16:45:19 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -833,6 +833,10 @@ if_netisr(void *unused) atomic_clearbits_int(&netisr, n); +#if NETHER > 0 + if (n & (1 << NETISR_ARP)) + arpintr(); +#endif if (n & (1 << NETISR_IP)) ipintr(); #ifdef INET6 diff --git a/sys/net/netisr.h b/sys/net/netisr.h index 5c709f5b76d..c295f86afbd 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: netisr.h,v 1.45 2016/05/03 14:52:39 mpi Exp $ */ +/* $OpenBSD: netisr.h,v 1.46 2016/07/13 16:45:19 mpi Exp $ */ /* $NetBSD: netisr.h,v 1.12 1995/08/12 23:59:24 mycroft Exp $ */ /* @@ -53,6 +53,7 @@ #define NETISR_IP 2 /* same as AF_INET */ #define NETISR_TX 3 /* for if_snd processing */ #define NETISR_PFSYNC 5 /* for pfsync "immediate" tx */ +#define NETISR_ARP 18 /* same as AF_LINK */ #define NETISR_IPV6 24 /* same as AF_INET6 */ #define NETISR_ISDN 26 /* same as AF_E164 */ #define NETISR_PPP 28 /* for PPP processing */ @@ -68,6 +69,7 @@ extern int netisr; /* scheduling bits for network */ extern struct task if_input_task_locked; +void arpintr(void); void ipintr(void); void ip6intr(void); void pppintr(void); -- cgit v1.2.3