diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-28 12:47:25 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-05-28 12:47:25 +0000 |
commit | 04118fa5ed9bf6eb646ed527244f672e44201dfc (patch) | |
tree | 19a1c6c40df9a793b06861dff8feeaa3eef84688 /sys/net/if.c | |
parent | ee86ecd52acd7e87f7cdb0a368767ade52ac90a5 (diff) |
Leaving IP multicast group requires the NET_LOCK().
Grab the lock before calling carpdetach().
ok bluhm@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 34fd1aa84d7..c6131d0dc30 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.497 2017/05/16 12:24:01 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.498 2017/05/28 12:47:24 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -977,8 +977,7 @@ if_deactivate(struct ifnet *ifp) { int s; - s = splnet(); - + NET_LOCK(s); /* * Call detach hooks from head to tail. To make sure detach * hooks are executed in the reverse order they were added, all @@ -991,8 +990,7 @@ if_deactivate(struct ifnet *ifp) if (ifp->if_carp && ifp->if_type != IFT_CARP) carp_ifdetach(ifp); #endif - - splx(s); + NET_UNLOCK(s); } /* |