[IPv4] In case of a bougus IPv4 version continnue dissection as IPv6 if

the version indicates IPv6.
This handles a case of Linux cooked capture with ethertype set as IPv4 for
IPv6 packets.

Change-Id: Ie79f1a631980a224a7b51963f9174e75ffb69a47
Reviewed-on: https://code.wireshark.org/review/14321
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
AndersBroman 2016-03-03 12:24:39 +01:00 committed by Anders Broman
parent 31654e5e5c
commit 780a703c5f
1 changed files with 5 additions and 0 deletions

View File

@ -2029,6 +2029,11 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
col_add_fstr(pinfo->cinfo, COL_INFO,
"Bogus IPv4 version (%u, must be 4)", hi_nibble(iph->ip_v_hl));
expert_add_info_format(pinfo, tf, &ei_ip_bogus_ip_version, "Bogus IPv4 version");
/* I have a Linux cooked capture with ethertype IPv4 containing an IPv6 packet, continnue dissection in that case*/
if (hi_nibble(iph->ip_v_hl) == 6) {
call_dissector(ipv6_handle, tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}