summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah.c
diff options
context:
space:
mode:
authorHakan Olsson <ho@cvs.openbsd.org>1999-11-04 11:23:44 +0000
committerHakan Olsson <ho@cvs.openbsd.org>1999-11-04 11:23:44 +0000
commit33d5222484aa34acf461785a9e6e9fad2ce6ee74 (patch)
tree1f93dccd4daae4f9e75dcb1854965571c86b5be4 /sys/netinet/ip_ah.c
parentcf2012cf938f4b4f6c8474a2c47b7462954ef47c (diff)
gettdb() should be at spltdb().
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