From 44e5946ea523e15886c811ca7b320cce2c576704 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/12176 --- 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 292ae9591a..f398c74288 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -890,7 +890,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, SHA1_DIGEST_LEN); sha1_hmac_update(&ms, zero, avp_len - 1); -- cgit v1.2.1