diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2015-08-21 08:45:49 +0100 |
---|---|---|
committer | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-08-21 16:06:17 +0000 |
commit | 69ec4a553050e56cc97ad48a512b3f41453ffa53 (patch) | |
tree | 6a5d9f2ee5c292b0b35c4a1b61f36eac361efb24 | |
parent | f8712aeeda620258b76efd753b5a493c8ecb5a9d (diff) | |
download | wireshark-69ec4a553050e56cc97ad48a512b3f41453ffa53.tar.gz |
Add "ip.version" field to bogus IP for filter matching
Change-Id: Ibb05b8742e41c1b16c1335ad97af99324ab95223
Reviewed-on: https://code.wireshark.org/review/10175
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
-rw-r--r-- | epan/dissectors/packet-ip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index d04e287239..46965ba8dc 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -2462,7 +2462,8 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) static void dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; + proto_tree *ip_tree; + proto_item *ti, *tf; guint8 version; version = tvb_get_guint8(tvb, 0) >> 4; @@ -2481,7 +2482,9 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "IP"); col_clear(pinfo->cinfo, COL_INFO); col_add_fstr(pinfo->cinfo, COL_INFO, "Bogus IP version (%u)", version); - expert_add_info(pinfo, ti, &ei_ip_bogus_ip_version); + ip_tree = proto_item_add_subtree(ti, ett_ip); + tf = proto_tree_add_item(ip_tree, hf_ip_version, tvb, 0, 1, ENC_NA); + expert_add_info(pinfo, tf, &ei_ip_bogus_ip_version); } static gboolean |