From fd40703cec6a6b49678ccfececed2d16f3586d22 Mon Sep 17 00:00:00 2001 From: provos Date: Fri, 28 Mar 1997 09:48:37 +0000 Subject: [PATCH] copy new iv only if existant --- sys/netinet/ip_espdesmd5.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_espdesmd5.c b/sys/netinet/ip_espdesmd5.c index 24e37899450..bf10750b2e3 100644 --- a/sys/netinet/ip_espdesmd5.c +++ b/sys/netinet/ip_espdesmd5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_espdesmd5.c,v 1.3 1997/02/26 20:53:18 deraadt Exp $ */ +/* $OpenBSD: ip_espdesmd5.c,v 1.4 1997/03/28 09:48:37 provos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -713,7 +713,8 @@ espdesmd5_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, str printf("espdesmd5_output: almost done now\n"); #endif - bcopy(iv, xd->edx_iv, ESPDESMD5_IVS); /* New IV */ + if (xd->edx_ivlen) + bcopy(iv, xd->edx_iv, ESPDESMD5_IVS); /* New IV */ /* Fix the length and the next protocol, copy back and off we go */ ipo.ip_len = htons(sizeof (struct ip) + ohlen + rlen + padding + -- 2.20.1