diff options
author | AndersBroman <anders.broman@ericsson.com> | 2016-03-03 12:24:39 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-03-03 12:48:20 +0000 |
commit | 780a703c5f60b2e3f6e0fbcb1cdd4432389d4298 (patch) | |
tree | 8f6dc1f91b7fa4ce84448310be8f6f542e824723 /epan/dissectors/packet-ip.c | |
parent | 31654e5e5c0c44609584140a10eb7d9aa1572673 (diff) |
[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>
Diffstat (limited to 'epan/dissectors/packet-ip.c')
-rw-r--r-- | epan/dissectors/packet-ip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index f6afb88425..078c6fb6c3 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -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); } |