diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2017-01-09 17:56:38 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2017-01-09 17:56:38 +0000 |
commit | 6422bf7e7a4f257316b5282de64efef0ee40cc39 (patch) | |
tree | c9644d29637c2c061f2183f90c87d6a76e93d807 /sys/netinet/ip_ipcomp.c | |
parent | cf421c1283bfb851ecceef84ef3af547f8b965df (diff) |
Grab the NET_LOCK() in ipcomp input callback.
OK mikeb@ mpi@
Diffstat (limited to 'sys/netinet/ip_ipcomp.c')
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 25d27229524..9dc504b760b 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.49 2016/12/24 11:17:35 mpi Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.50 2017/01/09 17:56:37 visa Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -217,7 +217,7 @@ ipcomp_input_cb(struct cryptop *crp) return (EINVAL); } - s = splsoftnet(); + NET_LOCK(s); tdb = gettdb(tc->tc_rdomain, tc->tc_spi, &tc->tc_dst, tc->tc_proto); if (tdb == NULL) { @@ -254,7 +254,7 @@ ipcomp_input_cb(struct cryptop *crp) /* Reset the session ID */ if (tdb->tdb_cryptoid != 0) tdb->tdb_cryptoid = crp->crp_sid; - splx(s); + NET_UNLOCK(s); return crypto_dispatch(crp); } free(tc, M_XDATA, 0); @@ -336,11 +336,11 @@ ipcomp_input_cb(struct cryptop *crp) /* Back to generic IPsec input processing */ error = ipsec_common_input_cb(m, tdb, skip, protoff); - splx(s); + NET_UNLOCK(s); return error; baddone: - splx(s); + NET_UNLOCK(s); m_freem(m); |