diff options
author | Bill Meier <wmeier@newsguy.com> | 2014-12-11 16:56:22 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-12-17 12:58:46 +0000 |
commit | 8ccdc07e8e1824398b63d2478958e38ba543e88b (patch) | |
tree | 85f980f6adbe90341e2322d9701fe0fce82c5a5b /epan | |
parent | d99fe210afb55e798627291f5276c9466ef4a5fc (diff) |
mip: fix (what appear to be) bugs in CVSE GRE key extension dissection
Change-Id: I43dc48de62eda3a62bef4bf4a40fd18cb45751f3
Reviewed-on: https://code.wireshark.org/review/5733
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-mip.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c index 0e81d72910..95c99e1c7e 100644 --- a/epan/dissectors/packet-mip.c +++ b/epan/dissectors/packet-mip.c @@ -109,7 +109,7 @@ static int hf_mip_pmipv4skipext_accesstechnology_type = -1; static int hf_mip_cvse_reserved = -1; static int hf_mip_cvse_vendor_org_id = -1; static int hf_mip_cvse_verizon_cvse_type = -1; -/* static int hf_mip_cvse_3gpp2_cvse_type = -1; */ +static int hf_mip_cvse_3gpp2_cvse_type = -1; static int hf_mip_cvse_3gpp2_grekey = -1; static int hf_mip_cvse_vendor_cvse_type = -1; static int hf_mip_cvse_vendor_cvse_value = -1; @@ -719,19 +719,22 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info /*Vendor CVSE Type*/ if( cvse_vendor_id == VENDOR_VERIZON ){ /*Verizon CVSE type*/ - proto_tree_add_item(ext_tree, hf_mip_cvse_verizon_cvse_type, tvb, cvse_local_offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(ext_tree, hf_mip_cvse_verizon_cvse_type, tvb, cvse_local_offset, 2, ENC_BIG_ENDIAN); }else if( cvse_vendor_id == VENDOR_THE3GPP2 ){ /*THE3GPP2 CVSE type*/ - cvse_3gpp2_type = tvb_get_ntohs(tvb, cvse_local_offset); - /* THE3GPP2 CVSE Value */ + proto_tree_add_item(ext_tree, hf_mip_cvse_3gpp2_cvse_type, tvb, cvse_local_offset, 2, ENC_BIG_ENDIAN); + cvse_3gpp2_type = tvb_get_ntohs(tvb, cvse_local_offset); + /* XXX: THE3GPP2 CVSE type is followed by a 2 byte length field ? - No ?*/ + /* ... */ + /* THE3GPP2 CVSE Value */ if(cvse_3gpp2_type == GRE_KEY_EXT){ - proto_tree_add_item(ext_tree, hf_mip_cvse_3gpp2_grekey, tvb, cvse_local_offset, ext_len - 6, ENC_NA); + proto_tree_add_item(ext_tree, hf_mip_cvse_3gpp2_grekey, tvb, cvse_local_offset + 2, ext_len - 6, ENC_BIG_ENDIAN); } }else{ /*CVSE Type of Other vendor, just show raw numbers currently*/ proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_cvse_type, tvb, cvse_local_offset, 2, ENC_BIG_ENDIAN); /* Vendor CVSE Type+Vendor/Org ID = 6 bytes*/ - proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_cvse_value, tvb, cvse_local_offset, ext_len - 6, ENC_NA); + proto_tree_add_item(ext_tree, hf_mip_cvse_vendor_cvse_value, tvb, cvse_local_offset + 2, ext_len - 6, ENC_NA); } break; @@ -1357,16 +1360,14 @@ void proto_register_mip(void) FT_UINT16, BASE_DEC, VALS(mip_cvse_verizon_cvse_types), 0, NULL, HFILL } }, -#if 0 { &hf_mip_cvse_3gpp2_cvse_type , { "3GPP2 CVSE Type","mip.ext.cvse.3gpp2_type", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } }, -#endif { &hf_mip_cvse_3gpp2_grekey, { "GRE Key","mip.ext.cvse.3gpp2_grekey", - FT_UINT16, BASE_DEC, NULL, 0, + FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_mip_cvse_vendor_cvse_type, |