diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2017-10-29 14:56:37 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2017-10-29 14:56:37 +0000 |
commit | 7b5436a077c81aa21598910cbd9f55634db28c1a (patch) | |
tree | d70e2c12f423f3e4d5b44cfdec4d28f216b327b6 /sys/netinet/ip_input.c | |
parent | c707a087273faf875fbe063929a72e595ec615dc (diff) |
Move NET_{,UN}LOCK into individual slowtimo functions.
Direction suggested by mpi
OK mpi, visa
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 95c9194efcb..8808d5cb2f0 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.324 2017/10/26 15:13:40 mpi Exp $ */ +/* $OpenBSD: ip_input.c,v 1.325 2017/10/29 14:56:36 florian Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1028,6 +1028,7 @@ ip_slowtimo(void) { struct ipq *fp, *nfp; + NET_LOCK(); mtx_enter(&ipq_mutex); LIST_FOREACH_SAFE(fp, &ipq, ipq_q, nfp) { if (--fp->ipq_ttl == 0) { @@ -1036,6 +1037,7 @@ ip_slowtimo(void) } } mtx_leave(&ipq_mutex); + NET_UNLOCK(); } /* |