From ee2da427626eb65c76141f084300531725aba50d Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Mon, 10 Jun 2019 08:13:27 +0200 Subject: [PATCH] batadv: Fix offset to ICMP v15 message type To correctly show the message type of an batman-adv ICMP v15 packet, the offset 3 inside the header has to be checked against the list of known packet types. Change-Id: I280aac59abd4133eac7d8381fac79f323c79b3de Fixes: 4cc431579363 ("batadv: Add dissector support for batadv v15") Signed-off-by: Sven Eckelmann Reviewed-on: https://code.wireshark.org/review/33545 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/dissectors/packet-batadv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-batadv.c b/epan/dissectors/packet-batadv.c index 994911243d..b547603b08 100644 --- a/epan/dissectors/packet-batadv.c +++ b/epan/dissectors/packet-batadv.c @@ -2370,7 +2370,7 @@ static void dissect_batadv_icmp_v15(tvbuff_t *tvb, packet_info *pinfo, icmp_packeth = (struct icmp_packet_v15 *)wmem_alloc(wmem_packet_scope(), sizeof(struct icmp_packet_v15)); - icmp_packeth->msg_type = tvb_get_guint8(tvb, offset + 4); + icmp_packeth->msg_type = tvb_get_guint8(tvb, offset + 3); /* Set info column */ col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u",