summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_esp.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_esp.c
parentcf2012cf938f4b4f6c8474a2c47b7462954ef47c (diff)
gettdb() should be at spltdb().
Diffstat (limited to 'sys/netinet/ip_esp.c')
-rw-r--r--sys/netinet/ip_esp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index b343ee47f57..10c16389760 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.25 1999/10/29 05:21:45 angelos Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.26 1999/11/04 11:23:43 ho Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -148,6 +148,7 @@ esp_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(spi, &sunion, IPPROTO_ESP);
if (tdbp == NULL)
{
@@ -242,7 +243,6 @@ esp_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)
{
@@ -264,7 +264,6 @@ esp_input(m, va_alist)
no_mem:
m->m_pkthdr.tdbi = tdbi;
- splx(s);
} else
m->m_pkthdr.tdbi = NULL;
@@ -295,6 +294,7 @@ esp_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