summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-06-14 04:42:11 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-06-14 04:42:11 +0000
commit9d7559077652247b444e4b658e9df7f2460f3122 (patch)
treef79780ba957d55813623a122044cce78d5bfe95c /sys
parentac3f80460bf8689fa1f6dd378411a65f205f837f (diff)
Initialize tc_ptr to zero if authentication is not used.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_esp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index 14901be6254..a8a75335c5d 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.44 2000/06/06 04:49:29 angelos Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.45 2000/06/14 04:42:10 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -420,7 +420,10 @@ esp_input(struct mbuf *m, struct tdb *tdb, int skip, int protoff)
m_copydata(m, m->m_pkthdr.len - alen, alen, tc->tc_ptr);
}
else
- crde = crp->crp_desc;
+ {
+ crde = crp->crp_desc;
+ tc->tc_ptr = 0;
+ }
/* Crypto operation descriptor */
crp->crp_ilen = m->m_pkthdr.len; /* Total input length */
@@ -943,6 +946,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
tc->tc_spi = tdb->tdb_spi;
tc->tc_proto = tdb->tdb_sproto;
+ tc->tc_ptr = 0;
bcopy(&tdb->tdb_dst, &tc->tc_dst, sizeof(union sockaddr_union));
/* Crypto operation descriptor */