summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/xform_esp.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-05-17 18:30:28 +0000
committerpjd <pjd@FreeBSD.org>2006-05-17 18:30:28 +0000
commit1f7868c704afbf4e8feb32d6bd24bbeebd94b35b (patch)
tree58e6a6e8a06d3307bbc2445fb72ca6d69f08d60f /sys/netipsec/xform_esp.c
parent4de9eb667b4c239151ad89537db3d68fbf193b2e (diff)
downloadFreeBSD-src-1f7868c704afbf4e8feb32d6bd24bbeebd94b35b.zip
FreeBSD-src-1f7868c704afbf4e8feb32d6bd24bbeebd94b35b.tar.gz
- The authsize field from auth_hash structure was removed.
- Define that we want to receive only 96 bits of HMAC. - Names of the structues have no longer _96 suffix. Reviewed by: sam
Diffstat (limited to 'sys/netipsec/xform_esp.c')
-rw-r--r--sys/netipsec/xform_esp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index cd9c312..fad3547 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -528,13 +528,13 @@ esp_input_cb(struct cryptop *crp)
ahstat.ahs_hist[sav->alg_auth]++;
if (mtag == NULL) {
/* Copy the authenticator from the packet */
- m_copydata(m, m->m_pkthdr.len - esph->authsize,
- esph->authsize, aalg);
+ m_copydata(m, m->m_pkthdr.len - AH_HMAC_HASHLEN,
+ AH_HMAC_HASHLEN, aalg);
ptr = (caddr_t) (tc + 1);
/* Verify authenticator */
- if (bcmp(ptr, aalg, esph->authsize) != 0) {
+ if (bcmp(ptr, aalg, AH_HMAC_HASHLEN) != 0) {
DPRINTF(("%s: "
"authentication hash mismatch for packet in SA %s/%08lx\n",
__func__,
@@ -547,7 +547,7 @@ esp_input_cb(struct cryptop *crp)
}
/* Remove trailing authenticator */
- m_adj(m, -(esph->authsize));
+ m_adj(m, -AH_HMAC_HASHLEN);
}
/* Release the crypto descriptors */
OpenPOWER on IntegriCloud