laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37837?usp=email )
Change subject: pySim.esim.saip: Move AKA specific post_dec + pre_enc to AKA subclass
......................................................................
pySim.esim.saip: Move AKA specific post_dec + pre_enc to AKA subclass
Having AKA specific code in the generic ProfileElement base class dated
back to when we didn't have a ProfileElementAKA subclass.
Change-Id: Icd332183758b8ef20a77507b728f5e455698def0
---
M pySim/esim/saip/__init__.py
1 file changed, 31 insertions(+), 31 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/37837/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 0d21499..f62fe5c 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -235,33 +235,6 @@
if mandated:
self.decoded[self.header_name] = { 'mandated': None}
- def _fixup_sqnInit_dec(self) -> None:
- """asn1tools has a bug when working with SEQUENCE OF that have DEFAULT values. Let's work around
- this."""
- if self.type != 'akaParameter':
- return
- sqn_init = self.decoded.get('sqnInit', None)
- if not sqn_init:
- return
- # this weird '0x' value in a string is what we get from our (slightly hacked) ASN.1 syntax
- if sqn_init == '0x000000000000':
- # SEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))
- self.decoded['sqnInit'] = [b'\x00'*6] * 32
-
- def _fixup_sqnInit_enc(self) -> None:
- """asn1tools has a bug when working with SEQUENCE OF that have DEFAULT values. Let's work around
- this."""
- if self.type != 'akaParameter':
- return
- sqn_init = self.decoded.get('sqnInit', None)
- if not sqn_init:
- return
- for s in sqn_init:
- if any(s):
- return
- # none of the fields were initialized with a non-default (non-zero) value, so we can skip it
- del self.decoded['sqnInit']
-
@property
def header_name(self) -> str:
"""Return the name of the header field within the profile element."""
@@ -337,8 +310,6 @@
else:
inst = ProfileElement(decoded)
inst.type = pe_type
- # work around asn1tools bug regarding DEFAULT for a SEQUENCE OF
- inst._fixup_sqnInit_dec()
# run any post-decoder a derived class may have
if hasattr(inst, '_post_decode'):
inst._post_decode()
@@ -349,8 +320,6 @@
# run any pre-encoder a derived class may have
if hasattr(self, '_pre_encode'):
self._pre_encode()
- # work around asn1tools bug regarding DEFAULT for a SEQUENCE OF
- self._fixup_sqnInit_enc()
return asn1.encode('ProfileElement', (self.type, self.decoded))
def __str__(self) -> str:
@@ -861,6 +830,37 @@
# provide some reasonable defaults for a MNO-SD
self.set_milenage(b'\x00'*16, b'\x00'*16)
+ def _fixup_sqnInit_dec(self) -> None:
+ """asn1tools has a bug when working with SEQUENCE OF that have DEFAULT values. Let's work around
+ this."""
+ sqn_init = self.decoded.get('sqnInit', None)
+ if not sqn_init:
+ return
+ # this weird '0x' value in a string is what we get from our (slightly hacked) ASN.1 syntax
+ if sqn_init == '0x000000000000':
+ # SEQUENCE (SIZE (32)) OF OCTET STRING (SIZE (6))
+ self.decoded['sqnInit'] = [b'\x00'*6] * 32
+
+ def _fixup_sqnInit_enc(self) -> None:
+ """asn1tools has a bug when working with SEQUENCE OF that have DEFAULT values. Let's work around
+ this."""
+ sqn_init = self.decoded.get('sqnInit', None)
+ if not sqn_init:
+ return
+ for s in sqn_init:
+ if any(s):
+ return
+ # none of the fields were initialized with a non-default (non-zero) value, so we can skip it
+ del self.decoded['sqnInit']
+
+ def _post_decode(self):
+ # work around asn1tools bug regarding DEFAULT for a SEQUENCE OF
+ self._fixup_sqnInit_dec()
+
+ def _pre_encode(self):
+ # work around asn1tools bug regarding DEFAULT for a SEQUENCE OF
+ self._fixup_sqnInit_enc()
+
def set_milenage(self, k: bytes, opc: bytes):
"""Configure akaParametes for MILENAGE."""
self.decoded['algoConfiguration'] = ('algoParameter', {
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37837?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: Icd332183758b8ef20a77507b728f5e455698def0
Gerrit-Change-Number: 37837
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Attention is currently required from: lynxis lazus.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/37831?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: add convert functions for old gprs_ra_id and the new osmo_routing_area_id
......................................................................
add convert functions for old gprs_ra_id and the new osmo_routing_area_id
There are some parts which still depend on the old gprs_ra_id (e.g. BSSGP, Iu).
Related: OS#6536
Change-Id: Iaef54cac541913534af00f40483723e9952a6807
---
M TODO-RELEASE
M include/osmocom/gsm/gsm48.h
M src/gsm/gsm48.c
M src/gsm/libosmogsm.map
4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/37831/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37831?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaef54cac541913534af00f40483723e9952a6807
Gerrit-Change-Number: 37831
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37796?usp=email )
Change subject: SGSN_Tests: add paging a whole routing area with multiple cells
......................................................................
SGSN_Tests: add paging a whole routing area with multiple cells
1. Attach + PDP Request
2. Wait for UE to be in Standby
3. Transmit to GTP Userdata
4. See the Paging on 2 BVCIs within the Routing Area
Change-Id: I88dc95669d57278a96e05ec84f934ebf70b319e5
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 50 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
neels: Looks good to me, approved
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index fe4b086..1d38d65 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2603,6 +2603,55 @@
f_cleanup();
}
+/*
+ * Wait for T3314 expiration and check that PS PAGING is created on DL PDU
+ * Use a Routing Area with 2 cells and expect paging on both cells.
+ *
+ * MS <-> SGSN: Attach Procedure
+ * MS <-> SGSN: PDP Context Request/Response
+ * MS SGSN: Timeout of T3314, MS location known only on Routing Area precision
+ * GGSN -> SGSN: User Data
+ * MS <-- SGSN: Paging PS all BVCI within the Routing Area
+ */
+private function f_TC_paging_ps_ra_multiple_cells(charstring id) runs on BSSGP_ConnHdlr {
+ var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
+
+ f_bssgp_client_unregister(g_pars.imsi, BSSGP_PROC[0]);
+ f_bssgp_client_register(g_pars.imsi, g_pars.tlli, BSSGP_PROC[1]);
+ f_bssgp_client_register(g_pars.imsi, g_pars.tlli, BSSGP_PROC[2]);
+
+ /* first perform regular attach */
+ f_gmm_attach(false, false, ran_index := 1);
+ /* then activate PDP context */
+ f_pdp_ctx_act(apars, ran_index := 1);
+
+ /* do a RAU to second BVCI */
+ /* then transceive a downlink PDU */
+ f_gtpu_xceive_mt(apars, f_rnd_octstring(100), ran_index := 1);
+
+ /* now wait for T3314 expiration (test_CT below has reduced it to 3s) */
+ f_sleep(5.0);
+
+ /* now data should be flowing again, but with PS PAGING */
+ f_gtpu_xceive_mt(apars, f_rnd_octstring(100), ran_index := 1);
+ BSSGP_SIG[1].receive(tr_BSSGP_PS_PAGING(?));
+ BSSGP_SIG[2].receive(tr_BSSGP_PS_PAGING(?));
+
+ /* FIXME: simulate paging response */
+ /* FIXME: verify PDU actually arrives only after paging response was successful */
+}
+
+testcase TC_paging_ps_ra_multiple_cells() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_vty_config(SGSNVTY, "sgsn", "timer 3314 3");
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_paging_ps_ra_multiple_cells), testcasename(), g_gb, 52);
+ vc_conn.done;
+ f_vty_config(SGSNVTY, "sgsn", "timer 3314 default");
+ f_cleanup();
+}
+
/* Run a RIM single report procedure over the sgsn. Since the SGSN will only do a transparent routing of the
* RIM messages this basically tests if the message is correctly transfered from one GB interface to the
* other and vice versa. */
@@ -3168,6 +3217,7 @@
execute( TC_suspend_resume() );
execute( TC_suspend_rau() );
execute( TC_paging_ps() );
+ execute( TC_paging_ps_ra_multiple_cells() );
execute( TC_bssgp_rim_single_report() );
execute( TC_rim_eutran_to_geran() );
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37796?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I88dc95669d57278a96e05ec84f934ebf70b319e5
Gerrit-Change-Number: 37796
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>