diff options
-rw-r--r-- | sys/netinet/ip_ah.c | 10 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 10 | ||||
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index 28c084839e4..058ea52370b 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.123 2016/09/19 18:09:22 tedu Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.124 2016/12/24 11:17:35 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -1219,7 +1219,7 @@ ah_output_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) { @@ -1236,7 +1236,7 @@ ah_output_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); @@ -1258,11 +1258,11 @@ ah_output_cb(struct cryptop *crp) crypto_freereq(crp); err = ipsp_process_done(m, tdb); - splx(s); + NET_UNLOCK(s); return err; baddone: - splx(s); + NET_UNLOCK(s); m_freem(m); diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 176a0f03012..44919020b7f 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.141 2016/09/19 18:09:22 tedu Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.142 2016/12/24 11:17:35 mpi Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -1064,7 +1064,7 @@ esp_output_cb(struct cryptop *crp) } - s = splsoftnet(); + NET_LOCK(s); tdb = gettdb(tc->tc_rdomain, tc->tc_spi, &tc->tc_dst, tc->tc_proto); if (tdb == NULL) { @@ -1081,7 +1081,7 @@ esp_output_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); @@ -1098,11 +1098,11 @@ esp_output_cb(struct cryptop *crp) /* Call the IPsec input callback. */ error = ipsp_process_done(m, tdb); - splx(s); + NET_UNLOCK(s); return error; baddone: - splx(s); + NET_UNLOCK(s); m_freem(m); diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 237cb8bd809..25d27229524 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.48 2016/09/24 14:51:37 naddy Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.49 2016/12/24 11:17:35 mpi Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -554,7 +554,7 @@ ipcomp_output_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) { @@ -571,7 +571,7 @@ ipcomp_output_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); @@ -588,7 +588,7 @@ ipcomp_output_cb(struct cryptop *crp) /* Compression was useless, we have lost time. */ crypto_freereq(crp); error = ipsp_process_done(m, tdb); - splx(s); + NET_UNLOCK(s); return error; } @@ -638,11 +638,11 @@ ipcomp_output_cb(struct cryptop *crp) crypto_freereq(crp); error = ipsp_process_done(m, tdb); - splx(s); + NET_UNLOCK(s); return error; baddone: - splx(s); + NET_UNLOCK(s); m_freem(m); |