diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-01-14 12:41:03 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-01-14 12:41:03 +0000 |
commit | bd0d0937425aa37f1d30cc5eb03882bb343d973b (patch) | |
tree | 8ae0de580ced2668f6e7045d032b84dca92beec6 /sys | |
parent | 944632046964b6160ebdc6642605c3441685cc77 (diff) |
Grab the KERNEL_LOCK before delivering a message to the routing socket
when an ARP resolution has been done.
Should hopefully fix the "receive 1" panic reported by benno@ on bugs@.
ok claudio@, phessler@, benno@, bluhm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/if_ether.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 53c97173a1d..b6d825cda0d 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.199 2016/01/08 13:53:24 mpi Exp $ */ +/* $OpenBSD: if_ether.c,v 1.200 2016/01/14 12:41:02 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -590,8 +590,11 @@ in_arpinput(struct mbuf *m) rt->rt_expire = time_second + arpt_keep; rt->rt_flags &= ~RTF_REJECT; /* Notify userland that an ARP resolution has been done. */ - if (la->la_asked || changed) + if (la->la_asked || changed) { + KERNEL_LOCK(); rt_sendmsg(rt, RTM_RESOLVE, ifp->if_rdomain); + KERNEL_UNLOCK(); + } la->la_asked = 0; while ((len = ml_len(&la->la_ml)) != 0) { mh = ml_dequeue(&la->la_ml); |