summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.c4
-rw-r--r--sys/netinet/ip_mroute.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 85116527742..b494b72e844 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.168 2019/12/01 21:12:42 jca Exp $ */
+/* $OpenBSD: in.c,v 1.169 2020/03/15 05:34:13 visa Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -929,7 +929,9 @@ in_delmulti(struct in_multi *inm)
sizeof(struct sockaddr_in);
satosin(&ifr.ifr_addr)->sin_family = AF_INET;
satosin(&ifr.ifr_addr)->sin_addr = inm->inm_addr;
+ KERNEL_LOCK();
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
+ KERNEL_UNLOCK();
TAILQ_REMOVE(&ifp->if_maddrlist, &inm->inm_ifma,
ifma_list);
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index feb43cd2a65..c6aae18b8db 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.128 2019/09/02 13:12:09 bluhm Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.129 2020/03/15 05:34:13 visa Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
@@ -772,7 +772,9 @@ vif_delete(struct ifnet *ifp)
satosin(&ifr.ifr_addr)->sin_len = sizeof(struct sockaddr_in);
satosin(&ifr.ifr_addr)->sin_family = AF_INET;
satosin(&ifr.ifr_addr)->sin_addr = zeroin_addr;
+ KERNEL_LOCK();
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, (caddr_t)&ifr);
+ KERNEL_UNLOCK();
free(v, M_MRTABLE, sizeof(*v));
}