From 04118fa5ed9bf6eb646ed527244f672e44201dfc Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sun, 28 May 2017 12:47:25 +0000 Subject: Leaving IP multicast group requires the NET_LOCK(). Grab the lock before calling carpdetach(). ok bluhm@ --- sys/netinet/ip_carp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/netinet') diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 3b2ae3dff8d..44e2f9493a0 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.310 2017/05/27 21:55:52 bluhm Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.311 2017/05/28 12:47:24 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -870,8 +870,12 @@ int carp_clone_destroy(struct ifnet *ifp) { struct carp_softc *sc = ifp->if_softc; + int s; + NET_LOCK(s); carpdetach(sc); + NET_UNLOCK(s); + ether_ifdetach(ifp); if_detach(ifp); carp_destroy_vhosts(ifp->if_softc); -- cgit v1.2.3