From 6ec1f9f990e38130e29b67af2ffe384bae134e96 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 24 Aug 2010 16:00:17 +0000 Subject: Add a splnet() around a block that needs it for sure. Maybe more in SIOCSIFRDOMAIN should be protected but this is by far the biggest offender. The same codepath in if_detach() runs at splnet(). --- sys/net/if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/net/if.c b/sys/net/if.c index 1ad04c99bb9..aea6b93be13 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.219 2010/07/31 20:48:32 blambert Exp $ */ +/* $OpenBSD: if.c,v 1.220 2010/08/24 16:00:16 claudio Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1496,6 +1496,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) /* remove all routing entries when switching domains */ /* XXX hell this is ugly */ if (ifr->ifr_rdomainid != ifp->if_rdomain) { + int s = splnet(); rt_if_remove(ifp); #ifdef INET rti_delete(ifp); @@ -1525,6 +1526,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) IFAFREE(ifa); } #endif + splx(s); } /* Add interface to the specified rdomain */ -- cgit v1.2.3