pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41754?usp=email )


Change subject: library/NGAP_Functions: return NAS_PDU IE from 
InitialContextSetup if present
......................................................................

library/NGAP_Functions: return NAS_PDU IE from InitialContextSetup if present

This is required to obtain the NAS PDU transmitted by open5gs-smfd
during Network Triggered Service Request.
In that message, the NAS_PDU inside the
PDUSessionResourceSetupListCxtReq item is empty, and instead the global
NAS_PDU is filled with a Service Accept.

Change-Id: I7fced3f920c2514f58711a2ca1cc60c8dc79e395
---
M library/NGAP_Functions.ttcn
1 file changed, 8 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/54/41754/1

diff --git a/library/NGAP_Functions.ttcn b/library/NGAP_Functions.ttcn
index c096214..e1fcf6d 100644
--- a/library/NGAP_Functions.ttcn
+++ b/library/NGAP_Functions.ttcn
@@ -153,10 +153,17 @@
                case (id_InitialContextSetup) {
                        var InitialContextSetupRequest msg := 
im.value_.initialContextSetupRequest;
                        for (i := 0; i < lengthof(msg.protocolIEs); i := i+1) {
+                               if (msg.protocolIEs[i].id == id_NAS_PDU) {
+                                       return 
msg.protocolIEs[i].value_.NAS_PDU;
+                               }
+                       }
+                       for (i := 0; i < lengthof(msg.protocolIEs); i := i+1) {
                                if (msg.protocolIEs[i].id == 
id_PDUSessionResourceSetupListCxtReq) {
                                        var PDUSessionResourceSetupListCxtReq 
req_li := msg.protocolIEs[i].value_.pDUSessionResourceSetupListCxtReq;
                                        for (j := 0; j < lengthof(req_li); j := 
j+1) {
-                                               return req_li[j].nAS_PDU;
+                                               if 
(ispresent(req_li[j].nAS_PDU)) {
+                                                       return 
req_li[j].nAS_PDU;
+                                               }
                                                /* FIXME: we should be 
returning req_li[j].pDUSessionResourceSetupRequestTransfer too... */
                                        }
                                }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41754?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7fced3f920c2514f58711a2ca1cc60c8dc79e395
Gerrit-Change-Number: 41754
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to