Skip to content

Commit

Permalink
NGAP: fix dissection of gNB/ng-eNB transparent container
Browse files Browse the repository at this point in the history
  • Loading branch information
pquantin authored and Wireshark GitLab Utility committed Jul 7, 2021
1 parent c2d77d9 commit 1c3739c
Show file tree
Hide file tree
Showing 2 changed files with 175 additions and 179 deletions.
16 changes: 7 additions & 9 deletions epan/dissectors/asn1/ngap/ngap.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,7 @@ UE-NGAP-IDs/aMF-UE-NGAP-ID ABBREV=AMF_UE_NGAP_ID
break;
}
} else {
if (ngap_dissect_target_ng_ran_container_as == NGAP_NG_RAN_CONTAINER_GNB) {
dissect_ngap_TargetNGRANNode_ToSourceNGRANNode_TransparentContainer_PDU(parameter_tvb, actx->pinfo, subtree, NULL);
} else if (ngap_dissect_target_ng_ran_container_as == NGAP_NG_RAN_CONTAINER_NG_ENB) {
dissect_s1ap_TargeteNB_ToSourceeNB_TransparentContainer_PDU(parameter_tvb, actx->pinfo, subtree, NULL);
}
dissect_ngap_TargetNGRANNode_ToSourceNGRANNode_TransparentContainer_PDU(parameter_tvb, actx->pinfo, subtree, NULL);
}
/* Enable writing of the column again */
col_set_writable(actx->pinfo->cinfo, COL_INFO, TRUE);
Expand Down Expand Up @@ -691,10 +687,12 @@ PortNumber TYPE = FT_UINT16 DISPLAY = BASE_DEC
proto_tree *subtree;
GlobalRANNodeID_enum ranmode_id;
if (ngap_data->transparent_container_type == SOURCE_TO_TARGET_TRANSPARENT_CONTAINER) {
ranmode_id = ngap_get_ranmode_id(&actx->pinfo->dst, actx->pinfo->destport, actx->pinfo);
} else if (ngap_data->transparent_container_type == TARGET_TO_SOURCE_TRANSPARENT_CONTAINER) {
ranmode_id = ngap_get_ranmode_id(&actx->pinfo->src, actx->pinfo->srcport, actx->pinfo);
if (ngap_data->transparent_container_type == SOURCE_TO_TARGET_TRANSPARENT_CONTAINER ||
ngap_data->transparent_container_type == TARGET_TO_SOURCE_TRANSPARENT_CONTAINER) {
if (actx->pinfo->destport == gbl_ngapSctpPort)
ranmode_id = ngap_get_ranmode_id(&actx->pinfo->src, actx->pinfo->srcport, actx->pinfo);
else
ranmode_id = ngap_get_ranmode_id(&actx->pinfo->dst, actx->pinfo->destport, actx->pinfo);
} else {
ranmode_id = (GlobalRANNodeID_enum)-1;
}
Expand Down
Loading

0 comments on commit 1c3739c

Please sign in to comment.