NAS 5GS: Handle SMS payload

Decode payload container type SMS using gsm_a_dtap dissector.

Bug: 15902
Change-Id: I8cb4ea8214613e6b09d5355f7643d600662169bb
Reviewed-on: https://code.wireshark.org/review/33849
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Stig Bjørlykke 2019-07-05 09:52:23 +02:00 committed by Anders Broman
parent 13b018f90f
commit 85ca8d7fce
1 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,8 @@ static dissector_handle_t eap_handle = NULL;
static dissector_handle_t nas_eps_handle = NULL;
static dissector_handle_t nas_eps_plain_handle = NULL;
static dissector_handle_t lpp_handle = NULL;
static dissector_handle_t gsm_a_dtap_handle;
#define PNAME "Non-Access-Stratum 5GS (NAS)PDU"
#define PSNAME "NAS-5GS"
@ -1590,6 +1592,13 @@ de_nas_5gs_mm_pld_cont(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
case 1: /* N1 SM information */
dissect_nas_5gs_common(tvb_new_subset_length(tvb, offset, len), pinfo, tree, 0, NULL);
break;
case 2: /* SMS */
if (gsm_a_dtap_handle) {
call_dissector(gsm_a_dtap_handle, tvb_new_subset_length(tvb, offset, len), pinfo, tree);
} else {
proto_tree_add_item(tree, hf_nas_5gs_mm_pld_cont, tvb, offset, len, ENC_NA);
}
break;
default:
proto_tree_add_item(tree, hf_nas_5gs_mm_pld_cont, tvb, offset, len, ENC_NA);
break;
@ -7479,6 +7488,7 @@ proto_reg_handoff_nas_5gs(void)
nas_eps_handle = find_dissector("nas-eps");
nas_eps_plain_handle = find_dissector("nas-eps_plain");
lpp_handle = find_dissector("lpp");
gsm_a_dtap_handle = find_dissector("gsm_a_dtap");
dissector_add_string("media_type", "application/vnd.3gpp.5gnas", create_dissector_handle(dissect_nas_5gs_media_type, proto_nas_5gs));
proto_json = proto_get_id_by_filter_name("json");
}