summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-03-25 04:57:52 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-03-25 04:57:52 +0000
commit8770aea7d892fae91b17c3bc9eb75d892a9a139c (patch)
tree21baab2abc29f8e5843cea811bc67416903f3f85 /sys/netinet
parent8bef55b0274e7deb6d89e1381f0f1d245816718a (diff)
Fix typo causing crash if ESP was used with only authentication or
encryption (not both). Problem noted by jason@openbsd.org
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_esp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index 88cff22e6f8..4713d5c3004 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.34 2000/03/21 21:00:09 angelos Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.35 2000/03/25 04:57:51 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -867,7 +867,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
m_copyback(m, protoff, sizeof(u_int8_t), (u_char *) &ilen);
/* Get crypto descriptors */
- crp = crypto_getreq(esph && espx ? 2 : 0);
+ crp = crypto_getreq(esph && espx ? 2 : 1);
if (crp == NULL)
{
m_freem(m);