diff options
author | 2010-08-24 16:00:16 +0000 | |
---|---|---|
committer | 2010-08-24 16:00:16 +0000 | |
commit | bb5c3eb8801f941c6f5cf4f45f30b55da26b456a (patch) | |
tree | e0d1c159d91936174fef1d638f9420c291e45649 | |
parent | Only do the link state checking and RTF_UP dance if the routing table is (diff) | |
download | wireguard-openbsd-bb5c3eb8801f941c6f5cf4f45f30b55da26b456a.tar.xz wireguard-openbsd-bb5c3eb8801f941c6f5cf4f45f30b55da26b456a.zip |
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().
-rw-r--r-- | sys/net/if.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 */ |