lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2024

  • 1 participants
  • 1478 discussions
[S] Change in pysim[master]: pySim.esim.saip: Refactor file size encoding into a method
by laforge 16 Aug '24

16 Aug '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37836?usp=email ) Change subject: pySim.esim.saip: Refactor file size encoding into a method ...................................................................... pySim.esim.saip: Refactor file size encoding into a method Change-Id: I46b8cb81ef8cc1794c11b61e0adfb575f937b349 --- M pySim/esim/saip/__init__.py 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/37836/1 diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py index 0bf805d..0d21499 100644 --- a/pySim/esim/saip/__init__.py +++ b/pySim/esim/saip/__init__.py @@ -97,13 +97,17 @@ self.pe_name = pename self.template = template self.fileDescriptor = {} - self.stream = None + self.body = None # apply some defaults from profile if self.template: self.from_template(self.template) if l: self.from_tuples(l) + def _encode_file_size(self, size: int) -> bytes: + # FIXME: handle > v2.0 case where it must be encoded on the minimum number of octets possible + return size.to_bytes(2, 'big') + def from_template(self, template: templates.FileTemplate): """Determine defaults for file based on given FileTemplate.""" fdb_dec = {} @@ -122,7 +126,7 @@ if template.rec_len: self.record_len = template.rec_len if template.nb_rec and template.rec_len: - self.fileDescriptor['efFileSize'] = (template.nb_rec * template.rec_len).to_bytes(2, 'big') # FIXME + self.fileDescriptor['efFileSize'] = self._encode_file_size(template.nb_rec * template.rec_len) if template.file_type == 'LF': fdb_dec['structure'] = 'linear_fixed' elif template.file_type == 'CY': @@ -131,12 +135,12 @@ fdb_dec['file_type'] = 'working_ef' fdb_dec['structure'] = 'ber_tlv' if template.file_size: - pefi['maximumFileSize'] = template.file_size.to_bytes(2, 'big') # FIXME + pefi['maximumFileSize'] = self._encode_file_size(template.file_size) elif template.file_type == 'TR': fdb_dec['file_type'] = 'working_ef' fdb_dec['structure'] = 'transparent' if template.file_size: - self.fileDescriptor['efFileSize'] = template.file_size.to_bytes(2, 'big') # FIXME + self.fileDescriptor['efFileSize'] = self._encode_file_size(template.file_size) elif template.file_type in ['MF', 'DF', 'ADF']: fdb_dec['file_type'] = 'df' fdb_dec['structure'] = 'no_info_given' -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37836?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: I46b8cb81ef8cc1794c11b61e0adfb575f937b349 Gerrit-Change-Number: 37836 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim.esim.saip: Move AKA specific post_dec + pre_enc to AKA subclass
by laforge 16 Aug '24

16 Aug '24
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>
1 0
0 0
[S] Change in libosmocore[master]: add convert functions for old gprs_ra_id and the new osmo_routing_are...
by lynxis lazus 16 Aug '24

16 Aug '24
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>
1 0
0 0
[S] Change in libosmocore[master]: add convert functions for old gprs_ra_id and the new osmo_routing_are...
by lynxis lazus 16 Aug '24

16 Aug '24
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/37831?usp=email ) 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/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 904d9e0..8a1e0dc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line gb ADD add bssgp_parse_cell_id2/bssgp_create_cell_id2 +gsm ADD add osmo_rai_to_gprs/gprs_rai_to_osmo diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h index 00fb6f4..d36b85c 100644 --- a/include/osmocom/gsm/gsm48.h +++ b/include/osmocom/gsm/gsm48.h @@ -42,6 +42,8 @@ const char *osmo_rai_name(const struct gprs_ra_id *rai); char *osmo_rai_name_buf(char *buf, size_t buf_len, const struct gprs_ra_id *rai); char *osmo_rai_name_c(const void *ctx, const struct gprs_ra_id *rai); +void osmo_rai_to_gprs(struct gprs_ra_id *dest, const struct osmo_routing_area_id *src); +void gprs_rai_to_osmo(struct osmo_routing_area_id *dest, const struct gprs_ra_id *src); int gsm48_decode_lai(struct gsm48_loc_area_id *lai, uint16_t *mcc, uint16_t *mnc, uint16_t *lac) diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 64b1765..1201595 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -222,6 +222,34 @@ return osmo_rai_name_buf(buf, 32, rai); } +/*! Convert osmo_routing_area_id (new) into gprs_ra_id (old) */ +void osmo_rai_to_gprs(struct gprs_ra_id *dest, const struct osmo_routing_area_id *src) +{ + OSMO_ASSERT(src); + OSMO_ASSERT(dest); + + dest->mcc = src->lac.plmn.mcc; + dest->mnc = src->lac.plmn.mnc; + dest->mnc_3_digits = src->lac.plmn.mnc_3_digits; + + dest->lac = src->lac.lac; + dest->rac = src->rac; +} + +/*! Convert gprs_ra_id (old) into osmo_routing_area_id (new) */ +void gprs_rai_to_osmo(struct osmo_routing_area_id *dest, const struct gprs_ra_id *src) +{ + OSMO_ASSERT(src); + OSMO_ASSERT(dest); + + dest->lac.plmn.mcc = src->mcc; + dest->lac.plmn.mnc = src->mnc; + dest->lac.plmn.mnc_3_digits = src->mnc_3_digits; + + dest->lac.lac = src->lac; + dest->rac = src->rac; +} + /* FIXME: convert to value_string */ static const char *cc_state_names[32] = { "NULL", diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 2c4c621..b792841 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -487,6 +487,8 @@ osmo_rai_name2; osmo_rai_name2_buf; osmo_rai_name2_c; +osmo_rai_to_gprs +gprs_rai_to_osmo; osmo_cgi_cmp; osmo_cgi_name; osmo_cgi_name_buf; -- 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: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaef54cac541913534af00f40483723e9952a6807 Gerrit-Change-Number: 37831 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: SGSN_Tests_NS: NS related tests: use the shutdown helper
by lynxis lazus 16 Aug '24

16 Aug '24
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37812?usp=email ) Change subject: SGSN_Tests_NS: NS related tests: use the shutdown helper ...................................................................... SGSN_Tests_NS: NS related tests: use the shutdown helper Currently the test case TC_SNS_config_sgsn() is failing because of a dynamic test error after succeeding. Use the Misc_Helpers.f_shutdown() to prevent this. Change-Id: I08eee0d11ae04276ca1ad8fd58ebb93dd6d0066f --- M sgsn/SGSN_Tests_NS.ttcn 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests_NS.ttcn b/sgsn/SGSN_Tests_NS.ttcn index e5d012f..ed21d5f 100644 --- a/sgsn/SGSN_Tests_NS.ttcn +++ b/sgsn/SGSN_Tests_NS.ttcn @@ -13,6 +13,7 @@ import from Osmocom_Types all; import from Osmocom_Gb_Types all; import from Osmocom_VTY_Functions all; +import from Misc_Helpers all; import from NS_Types all; import from RAW_NS all; import from SGSN_Tests all; @@ -29,6 +30,7 @@ f_sleep(1.0); f_clean_ns_codec(); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } testcase TC_NS_connect_alive() runs on RAW_Test_CT { @@ -45,6 +47,7 @@ f_sleep(1.0); f_clean_ns_codec(); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } /* perform outgoing SNS-SIZE procedure */ @@ -55,6 +58,7 @@ f_outgoing_sns_size(); setverdict(pass); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } /* outgoing SNS-SIZE procedure with more BSS side IPs than SGSN can handle */ @@ -65,6 +69,7 @@ f_outgoing_sns_size(cause := NS_CAUSE_INVALID_NR_OF_NSVCS, num_ip := 100); setverdict(pass); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } /* perform outgoing SNS-CONFIG procedure (for BSS) */ @@ -76,6 +81,7 @@ f_outgoing_sns_size(); f_outgoing_sns_config(); setverdict(pass); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } /* perform incoming SNS-CONFIG procedure (for SGSN) */ @@ -88,6 +94,7 @@ f_outgoing_sns_config(); f_incoming_sns_config(); setverdict(pass); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } /* perform full SNS handshake and then outbound NS-ALIVE */ @@ -101,6 +108,7 @@ f_incoming_sns_config(); f_outgoing_ns_alive(); setverdict(pass); + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } control { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37812?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: I08eee0d11ae04276ca1ad8fd58ebb93dd6d0066f Gerrit-Change-Number: 37812 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: SGSN_Tests_NS: TC_NS_connect_alive: set missing verdict
by lynxis lazus 16 Aug '24

16 Aug '24
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37813?usp=email ) Change subject: SGSN_Tests_NS: TC_NS_connect_alive: set missing verdict ...................................................................... SGSN_Tests_NS: TC_NS_connect_alive: set missing verdict Change-Id: I03574bc17a10d9098dcd25d73007ec5525c42c18 --- M sgsn/SGSN_Tests_NS.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/sgsn/SGSN_Tests_NS.ttcn b/sgsn/SGSN_Tests_NS.ttcn index ed21d5f..e1bc4a7 100644 --- a/sgsn/SGSN_Tests_NS.ttcn +++ b/sgsn/SGSN_Tests_NS.ttcn @@ -47,6 +47,7 @@ f_sleep(1.0); f_clean_ns_codec(); + setverdict(pass); Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37813?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: I03574bc17a10d9098dcd25d73007ec5525c42c18 Gerrit-Change-Number: 37813 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: SGSN_Tests: add paging a whole routing area with multiple cells
by lynxis lazus 16 Aug '24

16 Aug '24
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>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: SGSN_Tests: remove unused variable d
by lynxis lazus 16 Aug '24

16 Aug '24
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37811?usp=email ) Change subject: SGSN_Tests: remove unused variable d ...................................................................... SGSN_Tests: remove unused variable d Change-Id: I611e4444dfc9443584397e5523e7612ee5b00af4 --- M sgsn/SGSN_Tests.ttcn 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 1d38d65..cbf50dd 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -2572,7 +2572,6 @@ /* wait for T3314 expiration and check that PS PAGING is created on DL PDU */ private function f_TC_paging_ps(charstring id) runs on BSSGP_ConnHdlr { var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip)); - var default d; /* first perform regular attach */ f_TC_attach(id); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37811?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: I611e4444dfc9443584397e5523e7612ee5b00af4 Gerrit-Change-Number: 37811 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-upf[master]: upf gtp-u echo: improve loging
by neels 16 Aug '24

16 Aug '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/37828?usp=email ) Change subject: upf gtp-u echo: improve loging ...................................................................... upf gtp-u echo: improve loging Tweak GTPv1-U Echo logging to more consistently show logging like: DGTP INFO apn11 [23] 127.0.0.11:2152: <- 127.0.0.12:2152: rx GTPv1-U Echo Request: seq_nr=123 recovery_count=131 DGTP INFO apn11 [23] 127.0.0.11:2152: -> 127.0.0.12:2152: tx GTPv1-U Echo Response: seq_nr=123 recovery_count=570 Change-Id: I3c7fe7c3eb1467ae34085da6bbf26a935a6c927b --- M src/osmo-upf/upf_gtpu_echo.c 1 file changed, 27 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/28/37828/1 diff --git a/src/osmo-upf/upf_gtpu_echo.c b/src/osmo-upf/upf_gtpu_echo.c index cbf804b..d8958e8 100644 --- a/src/osmo-upf/upf_gtpu_echo.c +++ b/src/osmo-upf/upf_gtpu_echo.c @@ -50,12 +50,17 @@ static int tx_echo_resp(struct upf_gtp_dev *dev, const struct osmo_sockaddr *remote, uint16_t seq_nr); -static int rx_echo_req(struct upf_gtp_dev *dev, const struct osmo_sockaddr *remote, const struct gtp1u_hdr *rx_h) +static int rx_echo_req(struct upf_gtp_dev *dev, const struct osmo_sockaddr *remote, const struct gtp1u_hdr *rx_h, + size_t msg_len) { - if (!rx_h->s) { - LOG_GTP_DEV(dev, LOGL_ERROR, "rx GTPv1-U ECHO REQ without sequence nr\n"); - return -1; - } + uint16_t seq_nr = 0; + uint8_t recovery_count = 0; + if (msg_len >= (sizeof(*rx_h) + 2) && rx_h->data2[0] == GTP1U_IEI_RECOVERY) + recovery_count = rx_h->data2[1]; + + seq_nr = rx_h->s; + LOG_GTP_DEV(dev, LOGL_INFO, "<- %s: rx GTPv1-U Echo Request: seq_nr=%u recovery_count=%u\n", + osmo_sockaddr_to_str(remote), seq_nr, recovery_count); return tx_echo_resp(dev, remote, rx_h->ext.seq_nr); } @@ -66,7 +71,7 @@ struct gtp1u_hdr *tx_h; int rc; - msg = msgb_alloc_headroom(1024, 128, "GTP-echo-resp"); + msg = msgb_alloc_headroom(1024, 128, "GTPv1-U-echo-resp"); tx_h = (void *)msgb_put(msg, sizeof(*tx_h)); *tx_h = (struct gtp1u_hdr){ @@ -90,9 +95,13 @@ rc = sendto(dev->gtpv1.ofd.fd, msgb_data(msg), msgb_length(msg), 0, &remote->u.sa, sizeof(*remote)); if (rc < 0) { - int err = errno; - LOG_GTP_DEV(dev, LOGL_ERROR, "GTP1-U sendto(len=%d, to=%s): %s\n", msgb_length(msg), - osmo_sockaddr_to_str(remote), strerror(err)); + rc = -errno; + LOG_GTP_DEV(dev, LOGL_ERROR, "-> %s: tx GTPv1-U Echo Response: sendto(len=%d): %s\n", + osmo_sockaddr_to_str(remote), msgb_length(msg), strerror(-rc)); + } else { + LOG_GTP_DEV(dev, LOGL_INFO, "-> %s: tx GTPv1-U Echo Response: seq_nr=%u recovery_count=%u\n", + osmo_sockaddr_to_str(remote), seq_nr, g_upf->tunend.recovery_count); + rc = 0; } msgb_free(msg); return rc; @@ -121,27 +130,29 @@ /* A GTPv1-U header of size 8 is valid, but this code expects to handle only ECHO REQUEST messages. These are * required to have a sequence number, hence this check here consciously uses the full sizeof(*h) == 12. */ if (sz < sizeof(*h)) { - LOG_GTP_DEV(dev, LOGL_ERROR, "rx GTP packet smaller than the GTPv1-U header + sequence nr: %zd < %zu\n", - sz, sizeof(*h)); + LOG_GTP_DEV(dev, LOGL_ERROR, + "<- %s: rx GTPv1-U packet smaller than the GTPv1-U header + sequence nr: %zd < %zu\n", + osmo_sockaddr_to_str(&remote), sz, sizeof(*h)); return -1; } h = (const struct gtp1u_hdr *)buf; if (h->version != 1) { - LOG_GTP_DEV(dev, LOGL_ERROR, "rx GTP v%u: only GTP version 1 supported\n", h->version); + LOG_GTP_DEV(dev, LOGL_ERROR, "<- %s: rx GTPv1-U v%u: only GTP version 1 supported\n", + osmo_sockaddr_to_str(&remote), h->version); return -1; } h_length = osmo_load16be(&h->length); if (offsetof(struct gtp1u_hdr, data1) + h_length > sz) { - LOG_GTP_DEV(dev, LOGL_ERROR, "rx GTP: header + h.length = %zu > received bytes = %zd\n", - offsetof(struct gtp1u_hdr, data1) + h_length, sz); + LOG_GTP_DEV(dev, LOGL_ERROR, "<- %s: rx GTPv1-U: header + h.length = %zu > received bytes = %zd\n", + osmo_sockaddr_to_str(&remote), offsetof(struct gtp1u_hdr, data1) + h_length, sz); return -1; } switch (h->msg_type) { case GTP1U_MSGTYPE_ECHO_REQ: - return rx_echo_req(dev, &remote, h); + return rx_echo_req(dev, &remote, h, sz); default: LOG_GTP_DEV(dev, LOGL_ERROR, "rx: GTPv1-U message type %u not supported\n", h->msg_type); return -1; @@ -151,7 +162,7 @@ int upf_gtpu_echo_setup(struct upf_gtp_dev *dev) { if (dev->gtpv1.ofd.fd == -1) { - LOGP(DGTP, LOGL_ERROR, "Cannot setup GTP-U ECHO: GTP-v1 socket not initialized\n"); + LOGP(DGTP, LOGL_ERROR, "Cannot setup GTPv1-U ECHO: socket not initialized\n"); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37828?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I3c7fe7c3eb1467ae34085da6bbf26a935a6c927b Gerrit-Change-Number: 37828 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-upf[master]: upf gtp-u echo: rx Echo Response messages
by neels 16 Aug '24

16 Aug '24
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/37829?usp=email ) Change subject: upf gtp-u echo: rx Echo Response messages ...................................................................... upf gtp-u echo: rx Echo Response messages Support receiving of Echo Responses, so far showed an error log for unsupported message type. Just log the message. Prep for upcoming patch to allow sending Echo Requests from VTY. Change-Id: Idad417746a1ea797e8fbfe04ca9c84923a6118fa --- M src/osmo-upf/upf_gtpu_echo.c 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/29/37829/1 diff --git a/src/osmo-upf/upf_gtpu_echo.c b/src/osmo-upf/upf_gtpu_echo.c index d8958e8..b234065 100644 --- a/src/osmo-upf/upf_gtpu_echo.c +++ b/src/osmo-upf/upf_gtpu_echo.c @@ -65,6 +65,21 @@ return tx_echo_resp(dev, remote, rx_h->ext.seq_nr); } +static void rx_echo_resp(struct upf_gtp_dev *dev, const struct osmo_sockaddr *remote, const struct gtp1u_hdr *rx_h, + size_t msg_len) +{ + if (msg_len < (sizeof(*rx_h) + 2)) { + LOG_GTP_DEV(dev, LOGL_ERROR, + "<- %s: rx GTPv1-U Echo Response, but message is too short (%zu < %zu)\n", + osmo_sockaddr_to_str_c(OTC_SELECT, remote), msg_len, (sizeof(*rx_h) + 2)); + return; + } + + uint8_t recovery_count = rx_h->data2[1]; + LOG_GTP_DEV(dev, LOGL_INFO, "<- %s: rx GTPv1-U Echo Response: seq_nr=%u recovery_count=%u\n", + osmo_sockaddr_to_str(remote), rx_h->ext.seq_nr, recovery_count); +} + static int tx_echo_resp(struct upf_gtp_dev *dev, const struct osmo_sockaddr *remote, uint16_t seq_nr) { struct msgb *msg; @@ -153,6 +168,9 @@ switch (h->msg_type) { case GTP1U_MSGTYPE_ECHO_REQ: return rx_echo_req(dev, &remote, h, sz); + case GTP1U_MSGTYPE_ECHO_RSP: + rx_echo_resp(dev, &remote, h, sz); + return 0; default: LOG_GTP_DEV(dev, LOGL_ERROR, "rx: GTPv1-U message type %u not supported\n", h->msg_type); return -1; -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/37829?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Idad417746a1ea797e8fbfe04ca9c84923a6118fa Gerrit-Change-Number: 37829 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • ...
  • 148
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.