summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-12-19 11:30:26 +0000
committermpi <mpi@openbsd.org>2016-12-19 11:30:26 +0000
commit2745141d82c46a6d918f342ae2aa9450c3b25c29 (patch)
treeeb8b9862501d30f5e19f38a5c3a3df29e8ee2bb6 /sys/netinet/in.c
parentIf rt_ifa_addlocal() in in_ifinit() fails, the address has been (diff)
downloadwireguard-openbsd-2745141d82c46a6d918f342ae2aa9450c3b25c29.tar.xz
wireguard-openbsd-2745141d82c46a6d918f342ae2aa9450c3b25c29.zip
Remove a recursive splsoftnet() in in_ioctl() that already asserts that
it is called at IPL_SOFTNET.
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r--sys/netinet/in.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 230bf3355b6..1b2eb9e2e29 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.131 2016/12/19 10:35:12 bluhm Exp $ */
+/* $OpenBSD: in.c,v 1.132 2016/12/19 11:30:26 mpi Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -210,7 +210,6 @@ in_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, int privileged)
struct sockaddr_in oldaddr;
int error;
int newifaddr;
- int s;
splsoftassert(IPL_SOFTNET);
@@ -310,18 +309,15 @@ in_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, int privileged)
case SIOCSIFDSTADDR:
if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
return (EINVAL);
- s = splsoftnet();
oldaddr = ia->ia_dstaddr;
ia->ia_dstaddr = *satosin(&ifr->ifr_dstaddr);
if (ifp->if_ioctl && (error = (*ifp->if_ioctl)
(ifp, SIOCSIFDSTADDR, (caddr_t)ia))) {
ia->ia_dstaddr = oldaddr;
- splx(s);
return (error);
}
in_scrubhost(ia, &oldaddr);
in_addhost(ia, &ia->ia_dstaddr);
- splx(s);
break;
case SIOCSIFBRDADDR: