summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netipsec/ipsec_output.c')
-rw-r--r--sys/netipsec/ipsec_output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index b144a16..3b66887 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -345,12 +345,12 @@ ipsec4_process_packet(
struct secasindex saidx;
struct secasvar *sav;
struct ip *ip;
- int s, error, i, off;
+ int error, i, off;
KASSERT(m != NULL, ("ipsec4_process_packet: null mbuf"));
KASSERT(isr != NULL, ("ipsec4_process_packet: null isr"));
- s = splnet(); /* insure SA contents don't change */
+ mtx_lock(&isr->lock); /* insure SA contents don't change */
isr = ipsec_nextisr(m, isr, AF_INET, &saidx, &error);
if (isr == NULL)
@@ -469,10 +469,10 @@ ipsec4_process_packet(
} else {
error = ipsec_process_done(m, isr);
}
- splx(s);
+ mtx_unlock(&isr->lock);
return error;
bad:
- splx(s);
+ mtx_unlock(&isr->lock);
if (m)
m_freem(m);
return error;
OpenPOWER on IntegriCloud