Attention is currently required from: daniel, laforge, lynxis lazus.
pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?usp=email )
Change subject: TCAP: implement fallback routing when no TCAP ASP can be found.
......................................................................
Patch Set 8: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?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: I3e4e634b38a1845c2ce62a3805ff91a530520d88
Gerrit-Change-Number: 43008
Gerrit-PatchSet: 8
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 12 Aug 2026 07:32:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
jolly has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42817?usp=email )
(
4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: Add VTY test for "listen" node of osmo-stp VTY config
......................................................................
Add VTY test for "listen" node of osmo-stp VTY config
Change-Id: Ia1ceb5f0374f47ff269b557be30fc4d59550d1a6
---
M tests/vty/osmo_stp_test.vty
1 file changed, 29 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/tests/vty/osmo_stp_test.vty b/tests/vty/osmo_stp_test.vty
index d52ae5f..01cad83 100644
--- a/tests/vty/osmo_stp_test.vty
+++ b/tests/vty/osmo_stp_test.vty
@@ -423,6 +423,35 @@
OsmoSTP(config-cs7-asp)# exit
% NOTE: Skipping automatic restart of ASP since an explicit '[no] shutdown' command was entered
+OsmoSTP(config-cs7)# listen m3ua 2905
+OsmoSTP(config-cs7-listen)# list
+...
+ local-ip (A.B.C.D|X:X::X:X)
+ no local-ip (A.B.C.D|X:X::X:X)
+ init-ip-dscp <0-63>
+ no init-ip-dscp
+ accept-asp-connections (pre-configured|dynamic-permitted)
+ sctp-param init (num-ostreams|max-instreams) <0-65535>
+ no sctp-param init (num-ostreams|max-instreams)
+...
+
+OsmoSTP(config-cs7-listen)# ?
+...
+ local-ip Configure the Local IP Address for xUA
+ no Negate a command or set its defaults
+ init-ip-dscp Specify IP DSCP of Listener
+ accept-asp-connections Define what kind of ASP connections to accept
+ sctp-param Configure SCTP parameters
+...
+
+OsmoSTP(config-cs7-listen)# no ?
+...
+ local-ip Configure the Local IP Address for xUA
+ init-ip-dscp Specify IP DSCP of Listener
+ sctp-param Configure SCTP parameters
+...
+
+OsmoSTP(config-cs7-listen)# exit
OsmoSTP(config-cs7)# as my-ass m3ua
OsmoSTP(config-cs7-as)# list
...
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42817?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: Ia1ceb5f0374f47ff269b557be30fc4d59550d1a6
Gerrit-Change-Number: 42817
Gerrit-PatchSet: 6
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: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/43205?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: osmo-smdpp: derive the Profile Metadata from the Profile
......................................................................
osmo-smdpp: derive the Profile Metadata from the Profile
Only the ICCID came from the Profile. The SPN was hardcoded, the
profileName was the MatchingID, and the profileClass was always
'operational'. SGP.22 section 2.4.5.3 does not allow that class for a
Profile that uses the USIM test algorithm.
Add ProfileMetadata.from_pes() to read these fields from the Profile.
If the Profile has no EF.SPN, the SPN is now empty. An LPA shows a
Profile that is marked 'test' only in Device Test Mode.
The code also tested the MatchingID twice. Remove the second test.
Change-Id: Ie24dd5ac0ef541c1899dd923a9db568209bbfa62
---
M osmo-smdpp.py
M pySim/esim/es8p.py
M tests/unittests/test_esim_saip.py
3 files changed, 72 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/05/43205/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43205?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie24dd5ac0ef541c1899dd923a9db568209bbfa62
Gerrit-Change-Number: 43205
Gerrit-PatchSet: 2
Gerrit-Owner: Johannes Waigel <johannes(a)waigel.me>
Gerrit-Reviewer: Jenkins Builder
Johannes Waigel has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/43205?usp=email )
Change subject: osmo-smdpp: derive the Profile Metadata from the Profile
......................................................................
osmo-smdpp: derive the Profile Metadata from the Profile
The metadata was invented: a hardcoded SPN, the MatchingID as
profileName, and always 'operational' as profileClass. Test Profiles
were therefore sent as operational ones, which SGP.22 section 2.4.5.3
forbids.
Add ProfileMetadata.from_pes() to read these fields from the Profile.
An LPA now shows Test Profiles only in Device Test Mode.
Change-Id: Ie24dd5ac0ef541c1899dd923a9db568209bbfa62
---
M osmo-smdpp.py
M pySim/esim/es8p.py
2 files changed, 35 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/05/43205/1
diff --git a/osmo-smdpp.py b/osmo-smdpp.py
index 2a8e478..0346afc 100755
--- a/osmo-smdpp.py
+++ b/osmo-smdpp.py
@@ -629,7 +629,7 @@
# If ctxParams1 contains a ctxParamsForCommonAuthentication data object, the SM-DP+ Shall [...]
# TODO: We really do a very simplistic job here, this needs to be properly implemented later,
# considering all the various cases, profile state, etc.
- iccid_str = None
+ pes = None
if euiccSigned1['ctxParams1'][0] == 'ctxParamsForCommonAuthentication':
cpca = euiccSigned1['ctxParams1'][1]
matchingId = cpca.get('matchingId', None)
@@ -647,15 +647,14 @@
ss.matchingId = matchingId
with open(path, 'rb') as f:
pes = saip.ProfileElementSequence.from_der(f.read())
- iccid_str = b2h(pes.get_pe_for_type('header').decoded['iccid'])
else:
# there's currently no other option in the ctxParams1 choice, so this cannot happen
raise ApiError('1.3.1', '2.2', 'ctxParams1 missing mandatory ctxParamsForCommonAuthentication')
- # FIXME: we actually want to perform the profile binding herr, and read the profile metadata from the profile
+ # FIXME: we actually want to perform the profile binding here
# Put together profileMetadata + _bin
- ss.profileMetadata = ProfileMetadata(iccid_bin=h2b(swap_nibbles(iccid_str)), spn="OsmocomSPN", profile_name=matchingId)
+ ss.profileMetadata = ProfileMetadata.from_pes(pes, profile_name=matchingId)
# enable notifications for all operations
for event in ['enable', 'disable', 'delete']:
ss.profileMetadata.add_notification(event, self.server_hostname)
diff --git a/pySim/esim/es8p.py b/pySim/esim/es8p.py
index 6926cae..48ecfdd 100644
--- a/pySim/esim/es8p.py
+++ b/pySim/esim/es8p.py
@@ -17,13 +17,14 @@
from typing import Dict, List, Optional
from cryptography.hazmat.primitives.asymmetric import ec
-from osmocom.utils import b2h, h2b
+from osmocom.utils import b2h, h2b, swap_nibbles
from osmocom.tlv import bertlv_encode_tag, bertlv_encode_len, bertlv_parse_one_rawtag
from osmocom.tlv import bertlv_return_one_rawtlv
import pySim.esim.rsp as rsp
from pySim.esim.bsp import BspInstance
from pySim.esim import PMO
+from pySim.ts_51_011 import EF_SPN
import logging
logger = logging.getLogger(__name__)
@@ -73,6 +74,18 @@
return rsp.asn1.encode('ReplaceSessionKeysRequest', rsk)
+def spn_from_pes(pes) -> Optional[str]:
+ """Read the Service Provider Name from EF.SPN of the given Profile, or None if it has none."""
+ for pe_type in ['usim', 'gsm-access']:
+ pe = pes.get_pe_for_type(pe_type)
+ if not pe or 'ef-spn' not in getattr(pe, 'files', {}):
+ continue
+ content = pe.files['ef-spn'].file_content_from_tuples(pe.decoded['ef-spn'])
+ if content:
+ return EF_SPN().decode_hex(b2h(content))['spn']
+ return None
+
+
class ProfileMetadata:
"""Representation of Profile metadata. Right now only the mandatory bits are
supported, but in general this should follow the StoreMetadataRequest of SGP.22 5.5.3"""
@@ -85,6 +98,24 @@
self.icon_type = None
self.notifications = []
+ @classmethod
+ def from_pes(cls, pes, profile_name: Optional[str] = None) -> 'ProfileMetadata':
+ """Derive Profile metadata from the Profile itself, rather than from a separate source that
+ can disagree with it. profile_name is only used if the Profile header has no profileType."""
+ header = pes.get_pe_for_type('header').decoded
+
+ # SGP.22 Section 2.4.5.3: a Test Profile SHALL have its Profile Class set to 'test'. A
+ # Profile requiring the USIM test algorithm is one; that is condition 3 of that section.
+ if 'usim-test-algorithm' in header.get('eUICC-Mandatory-services', {}):
+ profile_class = 'test'
+ else:
+ profile_class = 'operational'
+
+ return cls(iccid_bin=h2b(swap_nibbles(b2h(header['iccid']))),
+ spn=spn_from_pes(pes) or '',
+ profile_name=header.get('profileType', profile_name) or '',
+ profile_class=profile_class)
+
def set_icon(self, is_png: bool, icon_data: bytes):
"""Set the icon that is part of the metadata."""
if len(icon_data) > 1024:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43205?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie24dd5ac0ef541c1899dd923a9db568209bbfa62
Gerrit-Change-Number: 43205
Gerrit-PatchSet: 1
Gerrit-Owner: Johannes Waigel <johannes(a)waigel.me>
Attention is currently required from: daniel, laforge, lynxis lazus.
Hello Jenkins Builder, daniel, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?usp=email
to look at the new patch set (#8).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: TCAP: implement fallback routing when no TCAP ASP can be found.
......................................................................
TCAP: implement fallback routing when no TCAP ASP can be found.
If a TCAP message from an ongoing session can't be routed by
either the TCAP session cache or by the destination TID to a known
ASP, allow to route the packet to a different destination.
Change-Id: I3e4e634b38a1845c2ce62a3805ff91a530520d88
---
M src/ss7_as.c
M src/ss7_as.h
M src/ss7_as_vty.c
M src/tcap_as_loadshare.c
M tests/vty/osmo_stp_test_tcap.vty
5 files changed, 78 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/08/43008/8
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43008?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3e4e634b38a1845c2ce62a3805ff91a530520d88
Gerrit-Change-Number: 43008
Gerrit-PatchSet: 8
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>