summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec_input.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-01 05:35:55 +0000
committersam <sam@FreeBSD.org>2003-09-01 05:35:55 +0000
commit7a8c89dde15c19a8c1e8eb2976dc9936d9b7329c (patch)
treec44de6fcda02feb74d7dccf3bde0ea476169307f /sys/netipsec/ipsec_input.c
parent591fec46c46db5741955ea71f2571001a039f4d0 (diff)
downloadFreeBSD-src-7a8c89dde15c19a8c1e8eb2976dc9936d9b7329c.zip
FreeBSD-src-7a8c89dde15c19a8c1e8eb2976dc9936d9b7329c.tar.gz
Locking and misc cleanups; most of which I've been running for >4 months:
o add locking o strip irrelevant spl's o split malloc types to better account for memory use o remove unused IPSEC_NONBLOCK_ACQUIRE code o remove dead code Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/netipsec/ipsec_input.c')
-rw-r--r--sys/netipsec/ipsec_input.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index 17e5218..0512b66 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -108,7 +108,7 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
union sockaddr_union dst_address;
struct secasvar *sav;
u_int32_t spi;
- int s, error;
+ int error;
IPSEC_ISTAT(sproto, espstat.esps_input, ahstat.ahs_input,
ipcompstat.ipcomps_input);
@@ -178,8 +178,6 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
return EPFNOSUPPORT;
}
- s = splnet();
-
/* NB: only pass dst since key_allocsa follows RFC2401 */
sav = KEY_ALLOCSA(&dst_address, sproto, spi);
if (sav == NULL) {
@@ -189,7 +187,6 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
(u_long) ntohl(spi), sproto));
IPSEC_ISTAT(sproto, espstat.esps_notdb, ahstat.ahs_notdb,
ipcompstat.ipcomps_notdb);
- splx(s);
m_freem(m);
return ENOENT;
}
@@ -202,7 +199,6 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
IPSEC_ISTAT(sproto, espstat.esps_noxform, ahstat.ahs_noxform,
ipcompstat.ipcomps_noxform);
KEY_FREESAV(&sav);
- splx(s);
m_freem(m);
return ENXIO;
}
@@ -213,7 +209,6 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
*/
error = (*sav->tdb_xform->xf_input)(m, sav, skip, protoff);
KEY_FREESAV(&sav);
- splx(s);
return error;
}
OpenPOWER on IntegriCloud