summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_espdesmd5.c
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-03-28 09:48:38 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-03-28 09:48:38 +0000
commit5fca16f4d30ccf6e3d26ff8a22e8f722bc59756a (patch)
tree6e989be1e4970b759ff0a1e6d121feca5a2eb111 /sys/netinet/ip_espdesmd5.c
parent093882065a2d973b90c78067f82ad93813dec744 (diff)
copy new iv only if existant
Diffstat (limited to 'sys/netinet/ip_espdesmd5.c')
-rw-r--r--sys/netinet/ip_espdesmd5.c5
1 files 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 +