From 31b3b64cb0b82b1994ada9869a143a31c3e834b5 Mon Sep 17 00:00:00 2001 From: angelos Date: Sat, 25 Mar 2000 04:57:51 +0000 Subject: [PATCH] Fix typo causing crash if ESP was used with only authentication or encryption (not both). Problem noted by jason@openbsd.org --- sys/netinet/ip_esp.c | 4 ++-- 1 file 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); -- 2.20.1