summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas S. Dade <nic.dade@gmail.com>2015-11-25 23:24:52 -0800
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-11-26 11:05:44 +0000
commitd752a7b44ed0c0e52b1052a90d3144fa9be02a9c (patch)
tree65207301b951f9eeec30bf0c4d812997196f2def
parent39a50f4a3feeef031b234a49899af1380b757409 (diff)
downloadwireshark-d752a7b44ed0c0e52b1052a90d3144fa9be02a9c.tar.gz
L2TP: Correct L2TP over IP SHA1 message digest
It should match the MD5 code, and skip over the 0x00000000 session id at the start of tvb. Change-Id: Ia3bee2bd07015523acc49bd7cb0247c3f1ac986e Reviewed-on: https://code.wireshark.org/review/12168 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> (cherry picked from commit 97e627e56d98bc45cd87cf629617c0dbd1798f6b) Reviewed-on: https://code.wireshark.org/review/12177
-rw-r--r--epan/dissectors/packet-l2tp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index 830ac7c278..e0d33f0db1 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -924,7 +924,7 @@ static void sha1_hmac_digest(l2tpv3_tunnel_t *tunnel,
}
}
- sha1_hmac_update(&ms, tvb_get_ptr(tvb, 0, idx + 1 - offset), idx + 1 - offset);
+ sha1_hmac_update(&ms, tvb_get_ptr(tvb, offset, idx + 1 - offset), idx + 1 - offset);
/* Message digest is calculated with an empty message digest field */
memset(zero, 0, L2TP_HMAC_SHA1_DIGEST_LEN);
sha1_hmac_update(&ms, zero, avp_len - 1);