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

December 2026

  • 1 participants
  • 245 discussions
[M] Change in osmo-msc[master]: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen
by pespin 02 Dec '26

02 Dec '26
Attention is currently required from: bucketking657, fixeria, neels. pespin has posted comments on this change by bucketking657. ( https://gerrit.osmocom.org/c/osmo-msc/+/44220?usp=email ) Change subject: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/44220/comment/22436643_a47c575b?usp… : PS1, Line 15: osmo-sgsn's copy of libvlr has the same unchecked call, but osmo-sgsn Can you please submit a similar fix for osmo-sgsn? Mentioning in the commit description it's a port from this one. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44220?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I24b71c8d568477680f735dc4044ec267385156ab Gerrit-Change-Number: 44220 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:44:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: S1AP_Templates: Fix f_tr_* templates with newer titan following ttcn3...
by laforge 02 Dec '26

02 Dec '26
Attention is currently required from: pespin. laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44219?usp=email ) Change subject: S1AP_Templates: Fix f_tr_* templates with newer titan following ttcn3 specs ...................................................................... Patch Set 3: (1 comment) Patchset: PS1: > I am not going to block, yet I am leaving it for someone else to do CR+1/CR+2 here. […] I am inclined to be with fixeria here: I don't really care what is spec and what is a titan "legacy" oddity. As long as titan has no schedule to completely remove/deprecate the old behaviour, why would we invest time in making our code more complicated? Or ist there a strict deadline where titan will abolish the old behaviour? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44219?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: I4fbee80a7245fa00c8c42ff10a8346691b94a839 Gerrit-Change-Number: 44219 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(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-Comment-Date: Wed, 02 Dec 2026 11:43:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: gsm: fix division by zero in osmo_nri_v_limit_by_ranges()
by pespin 02 Dec '26

02 Dec '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email ) Change subject: gsm: fix division by zero in osmo_nri_v_limit_by_ranges() ...................................................................... gsm: fix division by zero in osmo_nri_v_limit_by_ranges() If no NRI range fits within nri_bitlen (empty list, or all ranges above 2^nri_bitlen - 1), total_values is 0 and the modulo raises SIGFPE. Return -1 instead. Fixes: OS#7146 Change-Id: Ib4571d2a8e83ee94acb75a9d9d695048ee1bf370 --- M src/gsm/gsm23236.c M tests/gsm23236/gsm23236_test.c M tests/gsm23236/gsm23236_test.ok 3 files changed, 41 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/gsm/gsm23236.c b/src/gsm/gsm23236.c index a80ecf4..f5c40bc 100644 --- a/src/gsm/gsm23236.c +++ b/src/gsm/gsm23236.c @@ -115,6 +115,10 @@ total_values += OSMO_MIN(range_max, range->last) - range->first + 1; } + /* No range value fits within nri_bitlen, so there is nothing to pick from. */ + if (!total_values) + return -1; + /* Modulo the given NRI value by that, and pick that nth value from the given ranges. * (nri_ranges is pretty much guaranteed to be sorted and range_max checks thus would no longer be needed, but * just check them anyway.) */ diff --git a/tests/gsm23236/gsm23236_test.c b/tests/gsm23236/gsm23236_test.c index 6cbdbeb..a7c5936 100644 --- a/tests/gsm23236/gsm23236_test.c +++ b/tests/gsm23236/gsm23236_test.c @@ -594,6 +594,32 @@ } } +void test_nri_limit_by_ranges_no_fit(void) +{ + struct osmo_nri_ranges *nri_ranges = osmo_nri_ranges_alloc(ctx); + printf("\n%s()\n", __func__); + +#define LIMIT_NO_FIT(BITLEN) do { \ + int16_t nri_v = 42; \ + int rc = osmo_nri_v_limit_by_ranges(&nri_v, nri_ranges, BITLEN); \ + printf("osmo_nri_v_limit_by_ranges(42, bitlen %u) -> nri_v=%d rc=%d", BITLEN, nri_v, rc); \ + if (rc < 0 && nri_v == 42) { \ + printf(" ok\n"); \ + } else { \ + printf(" ERROR: expected nri_v=42 rc<0\n"); \ + ok = false; \ + } \ + } while (0) + + printf("empty list:\n"); + LIMIT_NO_FIT(8); + + ADD(300, 400); + printf("all ranges above the bitlen:\n"); + LIMIT_NO_FIT(8); + talloc_free(nri_ranges); +} + int main(int argc, char **argv) { ctx = talloc_named_const(NULL, 0, "nri_test"); @@ -603,6 +629,7 @@ test_nri_range_validate(); test_nri_list(); test_nri_limit_by_ranges(); + test_nri_limit_by_ranges_no_fit(); talloc_free(ctx); if (!ok) { diff --git a/tests/gsm23236/gsm23236_test.ok b/tests/gsm23236/gsm23236_test.ok index 22630bf..d436e6d 100644 --- a/tests/gsm23236/gsm23236_test.ok +++ b/tests/gsm23236/gsm23236_test.ok @@ -511,4 +511,14 @@ osmo_tmsi_nri_v_limit_by_ranges(0x00110000, 8) -> tmsi=0x00200000 nri_v=32 rc=0 ok osmo_tmsi_nri_v_limit_by_ranges(0x00120000, 8) -> tmsi=0x000a0000 nri_v=10 rc=0 ok +test_nri_limit_by_ranges_no_fit() +empty list: +osmo_nri_v_limit_by_ranges(42, bitlen 8) -> nri_v=42 rc=-1 ok +osmo_nri_ranges_add(300, 400) -> 0 +nri_ranges = { + { 300, 400 }, +}; +all ranges above the bitlen: +osmo_nri_v_limit_by_ranges(42, bitlen 8) -> nri_v=42 rc=-1 ok + pass -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib4571d2a8e83ee94acb75a9d9d695048ee1bf370 Gerrit-Change-Number: 44187 Gerrit-PatchSet: 2 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: mme: Introduce tests TC_incoming_update_bearer_*
by pespin 02 Dec '26

02 Dec '26
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198?usp=email ) Change subject: mme: Introduce tests TC_incoming_update_bearer_* ...................................................................... Patch Set 4: (1 comment) File mme/ConnHdlr.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198/comment/dd054764_daf5… : PS2, Line 760: var PDU_GTPCv2 rx_msg; > No, it's like unneeded `else` - it's making the code unclean! /joke This is testing code which can still be improved 10000 times by checking more and more stuff we want and have time/resources to add. If you want to mix this scenario with production code having more complex code paths so be it. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198?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: Ib0c0996ed1cbf9b2182e3b232b733af5b9c441ce Gerrit-Change-Number: 44198 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:39:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: gsm: fix division by zero in osmo_nri_v_limit_by_ranges()
by bucketking657 02 Dec '26

02 Dec '26
bucketking657 has posted comments on this change by bucketking657. ( https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email ) Change subject: gsm: fix division by zero in osmo_nri_v_limit_by_ranges() ...................................................................... Patch Set 1: @pespin @fixeria: thanks for the reviews. The osmo-msc part that checks this function's return code is now up as https://gerrit.osmocom.org/c/osmo-msc/+/44220. It needs this change merged first, since its new test fails on current libosmocore master. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44187?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib4571d2a8e83ee94acb75a9d9d695048ee1bf370 Gerrit-Change-Number: 44187 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:35:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: S1AP_Templates: Fix f_tr_* templates with newer titan following ttcn3...
by fixeria 02 Dec '26

02 Dec '26
Attention is currently required from: laforge, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44219?usp=email ) Change subject: S1AP_Templates: Fix f_tr_* templates with newer titan following ttcn3 specs ...................................................................... Patch Set 3: (1 comment) Patchset: PS1: > It's not my fault that TTCN-3 language specification doesn't allow doing what we used to do. […] I am not going to block, yet I am leaving it for someone else to do CR+1/CR+2 here. And I hope I don't have to touch these functions in the future... -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44219?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: I4fbee80a7245fa00c8c42ff10a8346691b94a839 Gerrit-Change-Number: 44219 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(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: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:33:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-sigtran[master]: tcap_as_loadshare: fix cosmetic whitespace
by lynxis 02 Dec '26

02 Dec '26
Attention is currently required from: pespin. lynxis has posted comments on this change by lynxis. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/44085?usp=email ) Change subject: tcap_as_loadshare: fix cosmetic whitespace ...................................................................... Patch Set 2: (1 comment) File src/ss7_as.h: https://gerrit.osmocom.org/c/libosmo-sigtran/+/44085/comment/4b9bbc10_971bc… : PS2, Line 74: SS7_AS_CTR_TCAP_ASP_FAILED, > this looks wrong? not cosmetic. yes. rebase failure. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/44085?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: Ie1e374de0ccdb5c34c89b5c962b3da89e118fb8a Gerrit-Change-Number: 44085 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:30:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: mme: Introduce tests TC_incoming_update_bearer_*
by fixeria 02 Dec '26

02 Dec '26
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198?usp=email ) Change subject: mme: Introduce tests TC_incoming_update_bearer_* ...................................................................... Patch Set 4: Code-Review+2 (1 comment) File mme/ConnHdlr.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198/comment/b0e5649f_cdf5… : PS2, Line 760: var PDU_GTPCv2 rx_msg; > It is being used to store the received message. […] No, it's like unneeded `else` - it's making the code unclean! /joke -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44198?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: Ib0c0996ed1cbf9b2182e3b232b733af5b9c441ce Gerrit-Change-Number: 44198 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:29:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen
by bucketking657 02 Dec '26

02 Dec '26
bucketking657 has posted comments on this change by bucketking657. ( https://gerrit.osmocom.org/c/osmo-msc/+/44220?usp=email ) Change subject: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen ...................................................................... Patch Set 1: "This depends on libosmocore Gerrit 44187 (https://gerrit.osmocom.org/c/libosmocore/+/44187) which needs to be merged first. Jenkins is expected to fail until then, because the new test hits the division by zero in osmo_nri_v_limit_by_ranges() on libosmocore master." -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44220?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I24b71c8d568477680f735dc4044ec267385156ab Gerrit-Change-Number: 44220 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com> Gerrit-Comment-Date: Wed, 02 Dec 2026 11:28:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No
1 0
0 0
[M] Change in osmo-msc[master]: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen
by bucketking657 02 Dec '26

02 Dec '26
bucketking657 has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/44220?usp=email ) Change subject: vlr: fail TMSI allocation if no NRI range fits the NRI bitlen ...................................................................... vlr: fail TMSI allocation if no NRI range fits the NRI bitlen If no configured NRI range fits nri_bitlen (e.g. 'nri bitlen 8' with only 'nri add 300 400'), osmo_tmsi_nri_v_limit_by_ranges() fails. Its return code was ignored, so the TMSI kept random NRI bits instead of a configured NRI. Log an error and fail the allocation, which rejects the LU. NRI bitlen 0 keeps skipping the NRI step, as before. osmo-sgsn's copy of libvlr has the same unchecked call, but osmo-sgsn cannot configure NRI ranges. Depends: libosmocore.git Change-Id Ib4571d2a8e83ee94acb75a9d9d695048ee1bf370 Related: OS#7146 Change-Id: I24b71c8d568477680f735dc4044ec267385156ab --- M src/libvlr/vlr.c M tests/msc_vlr/msc_vlr_test_no_authen.c M tests/msc_vlr/msc_vlr_test_no_authen.err 3 files changed, 176 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/20/44220/1 diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c index 95e4f28..64e235d 100644 --- a/src/libvlr/vlr.c +++ b/src/libvlr/vlr.c @@ -499,9 +499,14 @@ return rc; } - if (!llist_empty(&vlr->cfg.nri_ranges->entries)) { + /* NRI bitlen 0 means that NRI is not used (3GPP TS 23.236) */ + if (vlr->cfg.nri_bitlen && !llist_empty(&vlr->cfg.nri_ranges->entries)) { int16_t nri_v; - osmo_tmsi_nri_v_limit_by_ranges(&tmsi, vlr->cfg.nri_ranges, vlr->cfg.nri_bitlen); + if (osmo_tmsi_nri_v_limit_by_ranges(&tmsi, vlr->cfg.nri_ranges, vlr->cfg.nri_bitlen)) { + LOGVLR(LOGL_ERROR, "No NRI from range [%s] fits NRI bitlen %u, cannot allocate a TMSI\n", + osmo_nri_ranges_to_str_c(OTC_SELECT, vlr->cfg.nri_ranges), vlr->cfg.nri_bitlen); + return -1; + } osmo_tmsi_nri_v_get(&nri_v, tmsi, vlr->cfg.nri_bitlen); LOGVLR(LOGL_DEBUG, "New NRI from range [%s] = 0x%x --> TMSI 0x%08x\n", osmo_nri_ranges_to_str_c(OTC_SELECT, vlr->cfg.nri_ranges), nri_v, tmsi); diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.c b/tests/msc_vlr/msc_vlr_test_no_authen.c index 6e5b4b4..3fea1f1 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.c +++ b/tests/msc_vlr/msc_vlr_test_no_authen.c @@ -21,6 +21,8 @@ * */ +#include <osmocom/gsm/gsm23236.h> + #include "msc_vlr_tests.h" static void test_no_authen() @@ -963,6 +965,47 @@ comment_end(); } +static void test_no_authen_tmsi_nri_no_fit() +{ + struct osmo_nri_range nri_range = { .first = 300, .last = 400 }; + + rx_from_ran = OSMO_RAT_GERAN_A; + + comment_start(); + + net->vlr->cfg.assign_tmsi = true; + net->vlr->cfg.nri_bitlen = 8; + OSMO_ASSERT(osmo_nri_ranges_add(net->vlr->cfg.nri_ranges, &nri_range) == 0); + + btw("NRI range 300..400 does not fit NRI bitlen 8"); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000004026f0" CN_DOMAIN VLR_TO_HLR); + ms_sends_msg("050802008168000130089910070000006402"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000004026f00804036470f1" HLR_TO_VLR, + "12010809710000004026f0" VLR_TO_HLR); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT, no TMSI can be allocated, LU is rejected"); + expect_bssap_clear(); + gsup_rx("06010809710000004026f0" HLR_TO_VLR, NULL); + VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + ran_sends_clear_complete(); + EXPECT_CONN_COUNT(0); + + OSMO_ASSERT(osmo_nri_ranges_del(net->vlr->cfg.nri_ranges, &nri_range) == 0); + net->vlr->cfg.nri_bitlen = OSMO_NRI_BITLEN_DEFAULT; + clear_vlr(); + comment_end(); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_no_authen, test_no_authen_tmsi, @@ -973,5 +1016,6 @@ test_no_authen_imeisv_tmsi, test_no_authen_imeisv_tmsi_imei, test_no_authen_subscr_expire, + test_no_authen_tmsi_nri_no_fit, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_no_authen.err b/tests/msc_vlr/msc_vlr_test_no_authen.err index 229b2e3..c0e1216 100644 --- a/tests/msc_vlr/msc_vlr_test_no_authen.err +++ b/tests/msc_vlr/msc_vlr_test_no_authen.err @@ -3024,3 +3024,128 @@ llist_count(&msub_list) == 0 ===== test_no_authen_subscr_expire: SUCCESS +===== test_no_authen_tmsi_nri_no_fit +- NRI range 300..400 does not fit NRI bitlen 8 +- Location Update request causes a GSUP LU request to HLR + MSC <--GERAN-A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DMSC msub_fsm{active}: Allocated +DMSC msc_a{MSC_A_ST_VALIDATE_L3}: Allocated +DMSC msc_a{MSC_A_ST_VALIDATE_L3}: is child of msub_fsm +DMSC msc_a(unknown:GERAN-A:NONE){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_VALIDATE_L3 +DMSC dummy_msc_i{0}: Allocated +DMSC dummy_msc_i{0}: is child of msub_fsm +DREF msc_a(unknown:GERAN-A:NONE){MSC_A_ST_VALIDATE_L3}: + rx_from_ms: now used by 1 (rx_from_ms) +DBSSAP msc_a(unknown:GERAN-A:NONE){MSC_A_ST_VALIDATE_L3}: RAN decode: COMPL_L3 +DRLL msc_a(unknown:GERAN-A:NONE){MSC_A_ST_VALIDATE_L3}: Dispatching 04.08 message: MM GSM48_MT_MM_LOC_UPD_REQUEST +DMM msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: LOCATION UPDATING REQUEST: MI=IMSI-901700000004620 LU-type=IMSI-ATTACH +DMM msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: USIM: old LAI: 001-868-1 +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: + mm_rx_loc_upd_req: now used by 2 (rx_from_ms,mm_rx_loc_upd_req) +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: + lu: now used by 3 (rx_from_ms,mm_rx_loc_upd_req,lu) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: is child of msc_a(IMSI-901700000004620:GERAN-A:LU) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DVLR VLR subscr unknown + _lu_fsm_associate_vsub: now used by 1 (_lu_fsm_associate_vsub) +DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620 +DVLR New subscr, IMSI: 901700000004620 +DVLR VLR subscr IMSI-901700000004620 + active-conn: now used by 2 (_lu_fsm_associate_vsub,active-conn) +DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: Received Event MSC_A_EV_COMPLETE_LAYER_3_OK +DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_VALIDATE_L3}: state_chg to MSC_A_ST_AUTH_CIPH +DVLR VLR subscr IMSI-901700000004620 - _lu_fsm_associate_vsub: now used by 1 (active-conn) +DVLR set Last E-UTRAN PLMN ID on subscriber: (none) +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1_pre() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DMSC msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: RAN encode: COMMON_ID on GERAN-A +DMSC dummy_msc_i(IMSI-901700000004620:GERAN-A:LU){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:GERAN-A:LU) +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f02801020a01012a0101 +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - mm_rx_loc_upd_req: now used by 2 (rx_from_ms,lu) +DREF msc_a(IMSI-901700000004620:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - rx_from_ms: now used by 1 (lu) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804036470f10a0101 +DVLR VLR subscr IMSI-901700000004620 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) +DVLR IMSI:901700000004620 has MSISDN:46071 +DMSC msub(IMSI-901700000004620:MSISDN-46071) VLR: update for IMSI=901700000004620 (MSISDN=46071) +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f00a0101 +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsup_rx: now used by 1 (active-conn) +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT, no TMSI can be allocated, LU is rejected +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f00a0101 +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_gsup_rx: now used by 2 (active-conn,vlr_gsup_rx) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: lu_compl_vlr_new_tmsi() +DVLR No NRI from range [300..400] fits NRI bitlen 8, cannot allocate a TMSI +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_FAILURE +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_PARENT, caused by: upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU)) +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DVLR lu_compl_vlr_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){LU_COMPL_VLR_S_DONE}: Deferring: will deallocate with upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU) +- sending LU Reject for IMSI-901700000004620:MSISDN-46071:GERAN-A:LU, cause 34 +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_DONE}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_REGULAR, caused by: upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU)) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_DONE}: Removing from parent msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_REGULAR +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Received Event MSC_A_EV_CN_CLOSE +DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: - lu: now used by 0 (-) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: Received Event MSC_A_EV_UNUSED +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_AUTH_CIPH}: state_chg to MSC_A_ST_RELEASING +DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: Releasing: msc_a use is 0 (-) +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + msc_a_fsm_releasing_onenter: now used by 3 (active-conn,vlr_gsup_rx,msc_a_fsm_releasing_onenter) +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 + vlr_subscr_cancel_attach_fsm: now used by 4 (active-conn,vlr_gsup_rx,msc_a_fsm_releasing_onenter,vlr_subscr_cancel_attach_fsm) +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_subscr_cancel_attach_fsm: now used by 3 (active-conn,vlr_gsup_rx,msc_a_fsm_releasing_onenter) +DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: + wait-Clear-Complete: now used by 1 (wait-Clear-Complete) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: RAN encode: CLEAR_COMMAND on GERAN-A +DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - msc_a_fsm_releasing_onenter: now used by 2 (active-conn,vlr_gsup_rx) +DVLR vlr_lu_fsm(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){VLR_ULA_S_DONE}: Deferring: will deallocate with upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU) +DVLR upd_hlr_vlr_fsm(IMSI-901700000004620:GERAN-A:LU){UPD_HLR_VLR_S_DONE}: Deallocated, including all deferred deallocations +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - vlr_gsup_rx: now used by 1 (active-conn) +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 2 + bssap_clear_sent == 1 +DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: RAN decode: CLEAR_COMPLETE +DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: - wait-Clear-Complete: now used by 0 (-) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: Received Event MSC_A_EV_UNUSED +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASING}: state_chg to MSC_A_ST_RELEASED +DBSSAP msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASED}: Released: msc_a use is 0 (-) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASED}: Removing from parent msub_fsm +DREF msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASED}: max total use count was 3 +DMSC msub_fsm{active}: Received Event MSUB_EV_ROLE_TERMINATED +DMSC msub(IMSI-901700000004620:MSISDN-46071) MSC-A terminated +DMSC msub(IMSI-901700000004620:MSISDN-46071) 1 MSC-I still active +DMSC msub_fsm{active}: state_chg to terminating +DMSC msub_fsm{terminating}: Terminating in cascade, depth 2 (cause = OSMO_FSM_TERM_REGULAR, caused by: msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU)) +DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Terminating in cascade, depth 3 (cause = OSMO_FSM_TERM_PARENT, caused by: msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU)) +DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Removing from parent msub_fsm +DMSC dummy_msc_i(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){0}: Deferring: will deallocate with msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DMSC msub(IMSI-901700000004620:MSISDN-46071) Free +DVLR VLR subscr IMSI-901700000004620:MSISDN-46071 - active-conn: now used by 0 (-) +DVLR SUBSCR(IMSI-901700000004620:MSISDN-46071) freeing VLR subscr (max total use count was 4) +DMSC msub_fsm{terminating}: Deferring: will deallocate with msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU) +DMSC msc_a(IMSI-901700000004620:MSISDN-46071:GERAN-A:LU){MSC_A_ST_RELEASED}: Deallocated, including all deferred deallocations +- msub gone + llist_count(&msub_list) == 0 +===== test_no_authen_tmsi_nri_no_fit: SUCCESS + -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/44220?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: I24b71c8d568477680f735dc4044ec267385156ab Gerrit-Change-Number: 44220 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts(a)gmail.com>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • ...
  • 25
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.