From d752a7b44ed0c0e52b1052a90d3144fa9be02a9c Mon Sep 17 00:00:00 2001 From: "Nicolas S. Dade" Date: Wed, 25 Nov 2015 23:24:52 -0800 Subject: 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 (cherry picked from commit 97e627e56d98bc45cd87cf629617c0dbd1798f6b) Reviewed-on: https://code.wireshark.org/review/12177 --- epan/dissectors/packet-l2tp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1