pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40634?usp=email )
Change subject: RAN_Emulation: Fix handling of IMSI in RANAP Paging
......................................................................
RAN_Emulation: Fix handling of IMSI in RANAP Paging
The IMSI in RANAP Paging messages is encoded in octetstring BCD format.
We need to decode it before using it, since we use plain hexstrings
everywhere in the module to manage IMSIs.
Take the chance to clean up and improve logging on related lines, both
for BSSAP and RANAP.
Change-Id: Ia892a52bad41a4e331703bbab438d8c811b2025e
---
M library/Osmocom_Types.ttcn
M library/RAN_Emulation.ttcnpp
2 files changed, 24 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/40634/1
diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn
index a7e37e6..690535c 100644
--- a/library/Osmocom_Types.ttcn
+++ b/library/Osmocom_Types.ttcn
@@ -265,6 +265,22 @@
return ret;
}
+function imsi_oct2hex(octetstring imsi) return hexstring {
+ var hexstring ret := ''H
+ var integer i;
+
+ /* swap nibbles and skip F */
+ for (i := 0; i < lengthof(imsi); i := i+1) {
+ var hexstring h := oct2hex(imsi[i]);
+ if (h[0] == 'F'H) {
+ ret := ret & h[1];
+ } else {
+ ret := ret & h[1] & h[0];
+ }
+ }
+ return ret;
+}
+
function f_pad_oct(octetstring str, integer len, OCT1 pad) return octetstring {
var integer strlen := lengthof(str);
for (var integer i := 0; i < len-strlen; i := i+1) {
diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 9401ed6..4e28ab2 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -565,18 +565,19 @@
runs on RAN_Emulation_CT return template PDU_BSSAP {
if (match(bssap, tr_BSSMAP_Paging)) {
var RAN_ConnHdlr client := null;
- var template OCT4 tmsi := omit;
+ var hexstring imsi := bssap.pdu.bssmap.paging.iMSI.digits;
+ var template (omit) OCT4 tmsi := omit;
if (ispresent(bssap.pdu.bssmap.paging.tMSI)) {
tmsi := bssap.pdu.bssmap.paging.tMSI.tmsiOctets;
}
- client := f_imsi_table_find(bssap.pdu.bssmap.paging.iMSI.digits, tmsi);
+ client := f_imsi_table_find(imsi, tmsi);
if (client != null) {
log("CommonBssmapUnitdataCallback: IMSI/TMSI found in table, dispatching to ",
client);
CLIENT.send(bssap) to client;
return omit;
}
- log("CommonBssmapUnitdataCallback: IMSI/TMSI not found in table");
+ log("CommonBssmapUnitdataCallback: IMSI=", imsi, ", TMSI=", tmsi, " not found in table");
} else {
log("CommonBssmapUnitdataCallback: Not a paging message");
}
@@ -719,8 +720,8 @@
if (match(ranap, tr_RANAP_Paging(?, ?))) {
var RAN_ConnHdlr client := null;
/* extract IMSI and (if present) TMSI */
- var IMSI imsi := ranap.initiatingMessage.value_.paging.protocolIEs[1].value_.permanentNAS_UE_ID.iMSI;
- var template OCT4 tmsi := omit;
+ var hexstring imsi := imsi_oct2hex(ranap.initiatingMessage.value_.paging.protocolIEs[1].value_.permanentNAS_UE_ID.iMSI);
+ var template (omit) OCT4 tmsi := omit;
if (lengthof(ranap.initiatingMessage.value_.paging.protocolIEs) > 2 and
ranap.initiatingMessage.value_.paging.protocolIEs[2].id == id_TemporaryUE_ID) {
var TemporaryUE_ID ue_id;
@@ -731,14 +732,14 @@
tmsi := ue_id.p_TMSI;
}
}
- client := f_imsi_table_find(oct2hex(imsi), tmsi);
+ client := f_imsi_table_find(imsi, tmsi);
if (client != null) {
log("CommonRanapUnitdataCallback: IMSI/TMSI found in table, dispatching to ",
client);
CLIENT.send(ranap) to client;
return omit;
}
- log("CommonRanapUnitdataCallback: IMSI/TMSI not found in table");
+ log("CommonRanapUnitdataCallback: IMSI=", imsi, ", TMSI=", tmsi, " not found in table");
} else if (match(ranap, tr_RANAP_ResetResource(?, ?, ?))) {
/* extract IuSigConId */
if (lengthof(ranap.initiatingMessage.value_.resetResource.protocolIEs) > 2 and
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40634?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: Ia892a52bad41a4e331703bbab438d8c811b2025e
Gerrit-Change-Number: 40634
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/40631?usp=email )
Change subject: ran_peer: Avoid paging attempt if not ready
......................................................................
ran_peer: Avoid paging attempt if not ready
If the link is not ready it will fail to transmit the msg anyway,
so there's no use in trying to submit a page over it.
Change-Id: Ia858291f4454e4caf293e1aaf60ea04d2d4a64e9
---
M src/libmsc/ran_peer.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/40631/1
diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c
index bef753a..07e4328 100644
--- a/src/libmsc/ran_peer.c
+++ b/src/libmsc/ran_peer.c
@@ -682,6 +682,10 @@
{
struct msgb *l2;
+ /* ran_peer is not ready for paging (link not ready). */
+ if (!rp->fi || rp->fi->state != RAN_PEER_ST_READY)
+ return 0;
+
/* There are also the RAN peers that are configured in the neighbor ident for Handover, but if those aren't
* connected, then we can't Page there. */
if (!cell_id_list_find(&rp->cells_seen, page_id, 0, false))
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/40631?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia858291f4454e4caf293e1aaf60ea04d2d4a64e9
Gerrit-Change-Number: 40631
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40627?usp=email )
Change subject: Make sure MSC/SGSN PC are added to sccp-addressbook
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> The previous behavior still holds true in the sense that the default is only applied upon start of t […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40627?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I6a537adca27dd2bbad33d0f2be71eb41d6ad3a27
Gerrit-Change-Number: 40627
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 17:48:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email )
Change subject: xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
......................................................................
xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
ss7_asp_get_all_rctx_be() properly skips rctx=0 as per special osmocom
meaning "no rctx IE". However, in this case the count of rctx was used
to skip sending notifications to ASPs not associated to the AS/PC becoming
available/unavailable.
This fixes problems when both osmo-bsc and osmo-stp configure the
routing-key with rctx=0, meaning both agree to use no rctx.
Change-Id: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
---
M src/xua_snm.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 04568d2..e613573 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -232,7 +232,7 @@
num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as);
/* this can happen if the given ASP is only in the AS that reports the change,
* which shall be excluded */
- if (num_rctx == 0)
+ if (num_rctx == 0 && osmo_ss7_as_has_asp(as, asp))
continue;
xua_tx_snm_available(asp, rctx, num_rctx, aff_pc, num_aff_pc, info_str, available);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
Gerrit-Change-Number: 40621
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: daniel, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email )
Change subject: xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
Gerrit-Change-Number: 40621
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Jul 2025 17:47:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes