summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/ip_ah.c')
-rw-r--r--sys/netinet/ip_ah.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c
index 460d6de91c2..2b87e7cae55 100644
--- a/sys/netinet/ip_ah.c
+++ b/sys/netinet/ip_ah.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.c,v 1.25 1999/10/29 05:21:45 angelos Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.26 1999/11/04 11:23:43 ho Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -149,6 +149,7 @@ ah_input(m, va_alist)
sunion.sin.sin_family = AF_INET;
sunion.sin.sin_len = sizeof(struct sockaddr_in);
sunion.sin.sin_addr = ipo->ip_dst;
+ s = spltdb();
tdbp = gettdb(ahp->ah_spi, &sunion, IPPROTO_AH);
if (tdbp == NULL)
{
@@ -243,7 +244,6 @@ ah_input(m, va_alist)
if (ipo->ip_p == IPPROTO_TCP || ipo->ip_p == IPPROTO_UDP)
{
struct tdb_ident *tdbi = NULL;
- int s = spltdb();
if (tdbp->tdb_bind_out)
{
@@ -265,7 +265,6 @@ ah_input(m, va_alist)
no_mem:
m->m_pkthdr.tdbi = tdbi;
- splx(s);
} else
m->m_pkthdr.tdbi = NULL;
@@ -296,6 +295,7 @@ ah_input(m, va_alist)
bpf_mtap(m->m_pkthdr.rcvif->if_bpf, &m0);
}
#endif
+ splx(s);
/*
* Interface pointer is already in first mbuf; chop off the