diff options
author | 1999-11-04 11:23:43 +0000 | |
---|---|---|
committer | 1999-11-04 11:23:43 +0000 | |
commit | e300dd6b8037aa8b185b500fd5e6990fc71d302b (patch) | |
tree | 160ebdebdedc173e50faa8ac35bc95bb4a3a4ee9 | |
parent | pfkeyv2 aquire should not happen when bypassing IPsec. Add missing splx(). (diff) | |
download | wireguard-openbsd-e300dd6b8037aa8b185b500fd5e6990fc71d302b.tar.xz wireguard-openbsd-e300dd6b8037aa8b185b500fd5e6990fc71d302b.zip |
gettdb() should be at spltdb().
-rw-r--r-- | sys/netinet/ip_ah.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 6 |
2 files changed, 6 insertions, 6 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 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 |