jolly has submitted this change. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/40423?usp=email )
Change subject: Corrected decoding of MSISDN IE and IMEI IE
......................................................................
Corrected decoding of MSISDN IE and IMEI IE
1 2 3 4 5 6 7 8
+-------------------------------+
| MSISDN IE type |Res| octet 1
+-------------------------------+
| Length of IE content | octet 2
+-------------------------------+
| Length of BCD content | octet 3
+-------------------------------+
| Digit 1 | Digit 2 | octet 4..n
| .... | |
+-------------------------------+
The length of the BCD content specifies how many subsequent octets
contain BCD data (it does *not* indicate the number of digits).
This length must be less than the total length of the IE content.
Any octets following the BCD content shall be ignored.
Related: OS#6797
Change-Id: Idd2bee3d8f662d028001392cfd0332a265fbc91a
---
M src/osmocom/gsup/message.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
jolly: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/osmocom/gsup/message.py b/src/osmocom/gsup/message.py
index 8ab7881..e48cd54 100644
--- a/src/osmocom/gsup/message.py
+++ b/src/osmocom/gsup/message.py
@@ -133,8 +133,7 @@
_construct = None # empty
class MSISDN(GSUP_TLV_IE, tag=0x08):
- # TODO: do all existing implementations use ton/npi?
- _construct = Struct('ton_npi'/TonNpi, 'digits'/PaddedBcdAdapter(GreedyBytes))
+ _construct = Struct('bcd_len'/Byte, 'digits'/PaddedBcdAdapter(Bytes(this.bcd_len)))
class HlrNumber(GSUP_TLV_IE, tag=0x09):
_construct = Struct('ton_npi'/TonNpi, 'digits'/PaddedBcdAdapter(GreedyBytes))
@@ -185,7 +184,7 @@
_construct = Enum(Int8ub, ms_present=1, memory_available=2)
class IMEI(GSUP_TLV_IE, tag=0x50):
- _construct = PaddedBcdAdapter(GreedyBytes)
+ _construct = Struct('bcd_len'/Byte, 'digits'/PaddedBcdAdapter(Bytes(this.bcd_len)))
class ImeiCheckResult(GSUP_TLV_IE, tag=0x51):
_construct = Enum(Int8ub, ack=0, nack=1)
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/40423?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: Idd2bee3d8f662d028001392cfd0332a265fbc91a
Gerrit-Change-Number: 40423
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40443?usp=email )
Change subject: NGAP_Emulation: Fix match on DownlinkNASTransport with different list of IEs
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40443?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iaec861f8c0d55a2897896d695b9f70bca64af339
Gerrit-Change-Number: 40443
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 10 Jun 2025 10:27:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40442?usp=email )
Change subject: library: Improve some f_rnd_*() functions
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40442/comment/89ac9030_c4e5… :
PS1, Line 7: Improve some f_rnd_*() functions
> you're also adding `f_rnd_imeisv()`, and this is not mentioned at all here
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40442?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I82535caf08aa628738c0cbc29b8b27d525ec78ce
Gerrit-Change-Number: 40442
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 10 Jun 2025 10:27:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
jolly has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40443?usp=email )
Change subject: NGAP_Emulation: Fix match on DownlinkNASTransport with different list of IEs
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40443?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iaec861f8c0d55a2897896d695b9f70bca64af339
Gerrit-Change-Number: 40443
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 10 Jun 2025 10:06:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes