pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35376?usp=email )
Change subject: S1AP_Emulation: Fix NAS_PDU decoding of InitialContextSetupRequest msg
......................................................................
S1AP_Emulation: Fix NAS_PDU decoding of InitialContextSetupRequest msg
The InitialContextSetupRequest message contains a NAS_PDU deep inside
(in E-RABToBeSetupListCtxtSUReq), and it was not being rx_counted nor
decoded by the S1AP_Emulation.
Since we also care about the lower layer contents from the emulation
user point of view, first send the S1AP_PDU and later the decoded NAS_PDU.
This way the user can wait to receive the related low level S1AP_PDU,
and then read again from the port to get the decoded NAS_PDU.
Change-Id: Ibff5a38b92deafa8d104801f107ca1b8b82bbce0
---
M library/S1AP_Emulation.ttcn
1 file changed, 36 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/76/35376/1
diff --git a/library/S1AP_Emulation.ttcn b/library/S1AP_Emulation.ttcn
index bb3a2a4..9f36225 100644
--- a/library/S1AP_Emulation.ttcn
+++ b/library/S1AP_Emulation.ttcn
@@ -503,6 +503,11 @@
if (match(nas, tr_NAS_EMM_SecurityProtected)) {
nas := f_nas_try_decaps(S1apAssociationTable[assoc_id].nus, nas);
}
+ /* DL/UlNasTransport are not interesting, don't send them */
+ if (not match(mrf.msg, (tr_S1AP_DlNasTransport, tr_S1AP_UlNasTransport))) {
+ /* send raw S1AP */
+ S1AP_CLIENT.send(mrf.msg) to vc_conn;
+ }
/* send decoded NAS */
S1AP_CLIENT.send(nas) to vc_conn;
} else {
@@ -771,7 +776,7 @@
function f_S1AP_get_NAS_PDU(S1AP_PDU s1ap) return template (omit) NAS_PDU
{
- var integer i;
+ var integer i, j;
if (ischosen(s1ap.initiatingMessage)) {
var InitiatingMessage im := s1ap.initiatingMessage;
@@ -792,6 +797,19 @@
}
}
}
+ case (tr_S1AP_IntialCtxSetupReq) {
+ var InitialContextSetupRequest msg := im.value_.initialContextSetupRequest;
+ for (i := 0; i < lengthof(msg.protocolIEs); i := i+1) {
+ if (msg.protocolIEs[i].id == id_E_RABToBeSetupListCtxtSUReq) {
+ var E_RABToBeSetupListCtxtSUReq rab_req := msg.protocolIEs[i].value_.E_RABToBeSetupListCtxtSUReq;
+ for (j := 0; j < lengthof(rab_req); j := j+1) {
+ var E_RABToBeSetupItemCtxtSUReq it := rab_req[j].value_.E_RABToBeSetupItemCtxtSUReq;
+ return it.nAS_PDU;
+ }
+ }
+ }
+ return omit;
+ }
}
}
return omit;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35376?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibff5a38b92deafa8d104801f107ca1b8b82bbce0
Gerrit-Change-Number: 35376
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, fixeria, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
......................................................................
LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
Before this patch, the rx_count field was never set to anything other
than zero.
There's still a problem with counter not being incremented when a
S1AP_IntialCtxSetupReq message containing a NAS_PDU is received. This
will be fixed ina follow-up patch.
Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
---
M mme/LTE_CryptoFunctions.ttcn
1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/35366/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
Gerrit-Change-Number: 35366
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, fixeria, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
......................................................................
LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
Before this patch, the rx_count field was never set to anything other
than zero.
This makes f_nas_check_ip() success when receiving messages from
open5gs-mmed.
Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
---
M library/S1AP_Emulation.ttcn
M mme/LTE_CryptoFunctions.ttcn
2 files changed, 43 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/35366/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
Gerrit-Change-Number: 35366
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, osmith, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email )
Change subject: LTE_CryptoFunctions.ttcn: Use received SeqNum as nus.rx_count
......................................................................
Patch Set 2: -Code-Review
(1 comment)
Patchset:
PS2:
Hmm, actually this is not 100% what I suggested. We're discussing in PM.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
Gerrit-Change-Number: 35366
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 15 Dec 2023 17:16:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge, osmith, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email )
Change subject: LTE_CryptoFunctions.ttcn: Use received SeqNum as nus.rx_count
......................................................................
Patch Set 2: Code-Review+1
(2 comments)
Patchset:
PS2:
> Thanks @vyanitskiy@sysmocom. […]
Happy to hear it worked!
File mme/LTE_CryptoFunctions.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366/comment/792e74e1_d91a…
PS1, Line 151: nus.rx_count := nus.rx_count + 1;
> @laforge@gnumonks.org I tried fixing the following problem with this, but still not working: […]
Marking as resolved.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35366?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
Gerrit-Change-Number: 35366
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 15 Dec 2023 16:58:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment