summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r--sys/netinet/ip_icmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 56df4adc6d0..35db6be43ea 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.158 2016/12/19 08:36:49 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.159 2016/12/20 18:33:43 bluhm Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -878,13 +878,14 @@ int
icmp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
- int s, error;
+ int error;
+
+ NET_ASSERT_LOCKED();
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return (ENOTDIR);
- NET_LOCK(s);
switch (name[0]) {
case ICMPCTL_REDIRTIMEOUT:
@@ -921,7 +922,6 @@ icmp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
error = ENOPROTOOPT;
break;
}
- NET_UNLOCK(s);
return (error);
}