NAS 5GS: fix dissection of PLMN in a few IEs

The MNC is encoded in little endian format, not big endian.
The IEs impacted are 5GS tracking area identity list, service area list
and SOR transparent container.

Bug: 16162
Change-Id: I05acc5fb7d1c4a84f53cc5b2a21ee12c4813593d
Reviewed-on: https://code.wireshark.org/review/34874
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
This commit is contained in:
Pascal Quantin 2019-10-28 13:47:33 +01:00
parent 5e8b6f3012
commit c77471437f
1 changed files with 9 additions and 9 deletions

View File

@ -1017,7 +1017,7 @@ de_nas_5gs_mm_5gs_ta_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
while (tal_num_e > 0) {
proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
@ -1029,7 +1029,7 @@ de_nas_5gs_mm_5gs_ta_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
/*octet 5 TAC 1*/
@ -1041,7 +1041,7 @@ de_nas_5gs_mm_5gs_ta_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
/*octet 5 TAC 1*/
@ -1052,7 +1052,7 @@ de_nas_5gs_mm_5gs_ta_id_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
}
break;
case 3:
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
break;
default:
@ -2026,7 +2026,7 @@ de_nas_5gs_mm_sal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
while (sal_num_e > 0) {
proto_tree_add_item(sub_tree, hf_nas_5gs_tac, tvb, curr_offset, 3, ENC_BIG_ENDIAN);
@ -2038,7 +2038,7 @@ de_nas_5gs_mm_sal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
/*octet 5 TAC 1*/
@ -2050,7 +2050,7 @@ de_nas_5gs_mm_sal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
/*octet 2 MCC digit2 MCC digit1*/
/*octet 3 MNC digit3 MCC digit3*/
/*octet 4 MNC digit2 MNC digit1*/
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
/*octet 5 TAC 1*/
@ -2061,7 +2061,7 @@ de_nas_5gs_mm_sal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
}
break;
case 3:
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
break;
default:
@ -2236,7 +2236,7 @@ de_nas_5gs_mm_sor_trasp_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
* - according to TS 24.008 [9].
*/
/* PLMN ID 1 octet 23*- 25* */
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, FALSE);
curr_offset = dissect_e212_mcc_mnc(tvb, pinfo, sub_tree, curr_offset, E212_NONE, TRUE);
curr_offset += 3;
/* access technology identifier 1 octet 26*- 27* */
proto_tree_add_bitmask_list(tree, tvb, curr_offset, 1, flags_acces_tech_1, ENC_BIG_ENDIAN);