forked from osmocom/wireshark
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>
This commit is contained in:
parent
d99fe210af
commit
8ccdc07e8e
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue