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 osmo-ttcn3-hacks[master]: s1gw: Add mp_enb_bind_ip module parameter
by osmith 23 Aug '24

23 Aug '24
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37905?usp=email ) Change subject: s1gw: Add mp_enb_bind_ip module parameter ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37905?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: I294b14e6ef119c17eec22f813d5755279560e0bc Gerrit-Change-Number: 37905 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 09:28:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: s1gw: Split ConnHdlr to its own file
by osmith 23 Aug '24

23 Aug '24
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37898?usp=email ) Change subject: s1gw: Split ConnHdlr to its own file ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37898?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: I9f8d9afbccd59f3e22649b35d2a7ef75578d051a Gerrit-Change-Number: 37898 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 09:27:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XL] Change in docker-playground[master]: Remove ttcn3 testsuites ported to testenv, part 1
by osmith 23 Aug '24

23 Aug '24
Attention is currently required from: daniel, pespin. osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email ) Change subject: Remove ttcn3 testsuites ported to testenv, part 1 ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: added s1gw as requested by Pau (see https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37906/2 and https://gerrit.osmocom.org/c/osmo-ci/+/37913) -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I7182c7e8eb00a9323fe1b6d27f630d253b4d34f6 Gerrit-Change-Number: 37714 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 09:23:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XL] Change in docker-playground[master]: Remove ttcn3 testsuites ported to testenv, part 1
by osmith 23 Aug '24

23 Aug '24
Attention is currently required from: daniel, pespin. Hello Jenkins Builder, daniel, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by pespin, Verified+1 by Jenkins Builder Change subject: Remove ttcn3 testsuites ported to testenv, part 1 ...................................................................... Remove ttcn3 testsuites ported to testenv, part 1 Related: OS#6494 Depends: osmo-ci I6c7f88bb268a9f339b3af1d31d665e4376b34e48 Depends: osmo-ci Iac626d0c7c87c49ee6ba540ae1894abdb2336642 Change-Id: I7182c7e8eb00a9323fe1b6d27f630d253b4d34f6 --- D ttcn3-cbc-test/CBC_Tests.cfg D ttcn3-cbc-test/Dockerfile D ttcn3-cbc-test/Makefile D ttcn3-cbc-test/jenkins.sh D ttcn3-cbc-test/osmo-cbc.cfg D ttcn3-dia2gsup-test/DIA2GSUP_Tests.cfg D ttcn3-dia2gsup-test/Dockerfile D ttcn3-dia2gsup-test/Makefile D ttcn3-dia2gsup-test/jenkins.sh D ttcn3-dia2gsup-test/osmo_dia2gsup.config D ttcn3-hlr-test/Dockerfile D ttcn3-hlr-test/HLR_Tests.cfg D ttcn3-hlr-test/Makefile D ttcn3-hlr-test/jenkins.sh D ttcn3-hlr-test/osmo-hlr.cfg D ttcn3-hnodeb-test/Dockerfile D ttcn3-hnodeb-test/HNB_Tests.cfg D ttcn3-hnodeb-test/Makefile D ttcn3-hnodeb-test/jenkins.sh D ttcn3-hnodeb-test/osmo-hnodeb.cfg D ttcn3-hss-test-ogs/Dockerfile D ttcn3-hss-test-ogs/Makefile D ttcn3-hss-test-ogs/jenkins.sh D ttcn3-hss-test-ogs/ogs/HSS_Tests.cfg D ttcn3-hss-test-ogs/ogs/freediameter.conf D ttcn3-hss-test-ogs/ogs/mongod.conf D ttcn3-hss-test-ogs/ogs/open5gs-hss-latest.yaml D ttcn3-hss-test-ogs/ogs/open5gs-hss-master.yaml D ttcn3-mgw-test/Dockerfile D ttcn3-mgw-test/MGCP_Test.cfg D ttcn3-mgw-test/Makefile D ttcn3-mgw-test/jenkins.sh D ttcn3-mgw-test/osmo-mgw.cfg D ttcn3-mme-test-ogs/Dockerfile D ttcn3-mme-test-ogs/Makefile D ttcn3-mme-test-ogs/jenkins.sh D ttcn3-mme-test-ogs/ogs/MME_Tests.cfg D ttcn3-mme-test-ogs/ogs/freediameter.conf D ttcn3-mme-test-ogs/ogs/mme.sh D ttcn3-mme-test-ogs/ogs/open5gs-mme-latest.yaml D ttcn3-mme-test-ogs/ogs/open5gs-mme-master.yaml D ttcn3-s1gw-test/Dockerfile D ttcn3-s1gw-test/Makefile D ttcn3-s1gw-test/S1GW_Tests.cfg D ttcn3-s1gw-test/jenkins.sh D ttcn3-s1gw-test/osmo-s1gw.config D ttcn3-s1gw-test/s1gw.sh D ttcn3-sgsn-test-sns/jenkins.sh D ttcn3-sgsn-test-sns/osmo-stp.cfg D ttcn3-sgsn-test-sns/sns D ttcn3-sgsn-test/Dockerfile D ttcn3-sgsn-test/Makefile D ttcn3-sgsn-test/SGSN_Tests.cfg D ttcn3-sgsn-test/jenkins-sns.sh D ttcn3-sgsn-test/jenkins.sh D ttcn3-sgsn-test/osmo-sgsn.cfg D ttcn3-sgsn-test/osmo-stp.cfg D ttcn3-sgsn-test/sns/SGSN_Tests.cfg D ttcn3-sgsn-test/sns/osmo-sgsn.cfg D ttcn3-sgsn-test/ttcn3.sh D ttcn3-sip-test/Dockerfile D ttcn3-sip-test/Makefile D ttcn3-sip-test/SIP_Tests.cfg D ttcn3-sip-test/jenkins.sh D ttcn3-sip-test/osmo-sip-connector.cfg D ttcn3-smlc-test/Dockerfile D ttcn3-smlc-test/Makefile D ttcn3-smlc-test/SMLC_Tests.cfg D ttcn3-smlc-test/jenkins.sh D ttcn3-smlc-test/osmo-smlc.cfg D ttcn3-smlc-test/osmo-stp.cfg D ttcn3-upf-test/Dockerfile D ttcn3-upf-test/Makefile D ttcn3-upf-test/UPF_Tests.cfg D ttcn3-upf-test/jenkins.sh D ttcn3-upf-test/osmo-upf.cfg 76 files changed, 0 insertions(+), 2,614 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/14/37714/2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37714?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I7182c7e8eb00a9323fe1b6d27f630d253b4d34f6 Gerrit-Change-Number: 37714 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ci[master]: jobs/ttcn3-testsuites-testenv: add s1gw
by osmith 23 Aug '24

23 Aug '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/37913?usp=email ) Change subject: jobs/ttcn3-testsuites-testenv: add s1gw ...................................................................... jobs/ttcn3-testsuites-testenv: add s1gw Remove the docker-playground based job and add a new testenv based job instead. Add one for -latest too as we recently tagged the first releases. Do not limit the job to a specific node, looks like this was pasted from the above job by mistake. I've successfully ran this on another node build2-deb11build-ansible. Related: OS#6494 Depends: osmo-ttcn3-hacks Ib66c3f23355c117302b48fc9ef05cde1920d8739 Change-Id: Iac626d0c7c87c49ee6ba540ae1894abdb2336642 --- M jobs/ttcn3-testsuites-testenv.yml M jobs/ttcn3-testsuites.yml 2 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/13/37913/1 diff --git a/jobs/ttcn3-testsuites-testenv.yml b/jobs/ttcn3-testsuites-testenv.yml index e14d9f3..d1cf286 100644 --- a/jobs/ttcn3-testsuites-testenv.yml +++ b/jobs/ttcn3-testsuites-testenv.yml @@ -82,6 +82,11 @@ timer: H 07 * * * email: jenkins-notifications(a)lists.osmocom.org acetcom(a)gmail.com + - ttcn3-s1gw-test: + testsuite: s1gw + args: -b osmocom:nightly + timer: H 07 * * * + # --------------------------------------------- # Debian latest # --------------------------------------------- @@ -131,6 +136,11 @@ timer: H 10 * * * disabled: true + - ttcn3-s1gw-test-latest: + testsuite: s1gw + args: -b osmocom:latest + timer: H 10 * * * + # --------------------------------------------- # Debian nightly + io_uring (OS#6357) # --------------------------------------------- diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml index e11f5f3..98becb5 100644 --- a/jobs/ttcn3-testsuites.yml +++ b/jobs/ttcn3-testsuites.yml @@ -128,10 +128,6 @@ timer: H 07 * * * # osmo-epdg requires OTP and kernel >= debian12: node: build4-deb12build-ansible - - ttcn3-s1gw-test: - timer: H 07 * * * - # osmo-s1gw requires OTP and kernel >= debian12: - node: build4-deb12build-ansible - ttcn3-asterisk-ims-ue-test: timer: H 07 * * * -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37913?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iac626d0c7c87c49ee6ba540ae1894abdb2336642 Gerrit-Change-Number: 37913 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: s1gw: initial testenv.cfg
by osmith 23 Aug '24

23 Aug '24
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37906?usp=email ) Change subject: s1gw: initial testenv.cfg ...................................................................... Patch Set 2: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37906?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: Ib66c3f23355c117302b48fc9ef05cde1920d8739 Gerrit-Change-Number: 37906 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 08:52:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: pfcp_peer: Retry PFCP assiciation towards UPF instead of exiting
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: fixeria, lynxis lazus, pespin. laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37907?usp=email ) Change subject: pfcp_peer: Retry PFCP assiciation towards UPF instead of exiting ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37907?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ic17c1c7210ab4ae0ddc840a5ffd13b7cdda243c9 Gerrit-Change-Number: 37907 Gerrit-PatchSet: 1 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: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Fri, 23 Aug 2024 06:56:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-hlr[master]: subscriber-create-on-demand: rework configuration
by laforge 23 Aug '24

23 Aug '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/37779?usp=email ) Change subject: subscriber-create-on-demand: rework configuration ...................................................................... subscriber-create-on-demand: rework configuration This commit prepares for adding a new subscriber-create-on-demand mode (MSISDN=IMSI), which is implemented in a follow-up patch. * add an enumerated type for subscriber-create-on-demand mode; * store the related parameters in an anonymous structure. Change-Id: Ib553172655f83dad1ac0e0254615c8c207d79ca9 --- M include/osmocom/hlr/hlr.h M src/hlr.c M src/hlr_vty.c M tests/test_nodes.vty 4 files changed, 68 insertions(+), 32 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve neels: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 278a85a..4bdb5b0 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -39,6 +39,12 @@ extern struct osmo_tdef g_hlr_tdefs[]; +enum subscr_create_on_demand_mode { + SUBSCR_COD_MODE_DISABLED = 0, + SUBSCR_COD_MODE_NO_MSISDN, + SUBSCR_COD_MODE_RAND_MSISDN, +}; + struct hlr { /* GSUP server pointer */ struct osmo_gsup_server *gs; @@ -80,10 +86,12 @@ bool store_imei; - bool subscr_create_on_demand; - /* Bitmask of DB_SUBSCR_FLAG_* */ - uint8_t subscr_create_on_demand_flags; - unsigned int subscr_create_on_demand_rand_msisdn_len; + struct { + enum subscr_create_on_demand_mode mode; + unsigned int rand_msisdn_len; + /* Bitmask of DB_SUBSCR_FLAG_* */ + uint8_t flags; + } subscr_create_on_demand; struct { bool allow_startup; diff --git a/src/hlr.c b/src/hlr.c index 8ad3dfc..44c96b5 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -204,23 +204,31 @@ { char msisdn[GSM23003_MSISDN_MAX_DIGITS + 1]; int rc; - unsigned int rand_msisdn_len = g_hlr->subscr_create_on_demand_rand_msisdn_len; - if (!g_hlr->subscr_create_on_demand) - return -1; if (db_subscr_exists_by_imsi(g_hlr->dbc, imsi) == 0) return -1; - if (rand_msisdn_len && generate_new_msisdn(msisdn, imsi, rand_msisdn_len) != 0) + + switch (g_hlr->subscr_create_on_demand.mode) { + case SUBSCR_COD_MODE_RAND_MSISDN: + if (generate_new_msisdn(msisdn, imsi, g_hlr->subscr_create_on_demand.rand_msisdn_len) != 0) + return -1; + break; + case SUBSCR_COD_MODE_NO_MSISDN: + msisdn[0] = '\0'; + break; + case SUBSCR_COD_MODE_DISABLED: + default: return -1; + } LOGP(DMAIN, LOGL_INFO, "IMSI='%s': Creating subscriber on demand\n", imsi); - rc = db_subscr_create(g_hlr->dbc, imsi, g_hlr->subscr_create_on_demand_flags); + rc = db_subscr_create(g_hlr->dbc, imsi, g_hlr->subscr_create_on_demand.flags); if (rc) { LOGP(DMAIN, LOGL_ERROR, "Failed to create subscriber on demand (rc=%d): IMSI='%s'\n", rc, imsi); return rc; } - if (!rand_msisdn_len) + if (msisdn[0] == '\0') return 0; /* Update MSISDN of the new (just allocated) subscriber */ diff --git a/src/hlr_vty.c b/src/hlr_vty.c index c4e99e2..ae1e13e 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -282,6 +282,36 @@ return CMD_SUCCESS; } +static void config_write_subscr_create_on_demand(struct vty *vty) +{ + const uint8_t flags = g_hlr->subscr_create_on_demand.flags; + const char *flags_str; + + switch (g_hlr->subscr_create_on_demand.mode) { + case SUBSCR_COD_MODE_RAND_MSISDN: + vty_out(vty, " subscriber-create-on-demand %u", + g_hlr->subscr_create_on_demand.rand_msisdn_len); + break; + case SUBSCR_COD_MODE_NO_MSISDN: + vty_out(vty, " subscriber-create-on-demand no-msisdn"); + break; + case SUBSCR_COD_MODE_DISABLED: + default: + vty_out(vty, " no subscriber-create-on-demand%s", VTY_NEWLINE); + return; + } + + if ((flags & DB_SUBSCR_FLAG_NAM_CS) && (flags & DB_SUBSCR_FLAG_NAM_PS)) + flags_str = "cs+ps"; + else if (flags & DB_SUBSCR_FLAG_NAM_CS) + flags_str = "cs"; + else if (flags & DB_SUBSCR_FLAG_NAM_PS) + flags_str = "ps"; + else + flags_str = "none"; + vty_out(vty, " %s%s", flags_str, VTY_NEWLINE); +} + static int config_write_hlr(struct vty *vty) { @@ -299,23 +329,7 @@ vty_out(vty, " store-imei%s", VTY_NEWLINE); if (g_hlr->db_file_path && strcmp(g_hlr->db_file_path, HLR_DEFAULT_DB_FILE_PATH)) vty_out(vty, " database %s%s", g_hlr->db_file_path, VTY_NEWLINE); - if (g_hlr->subscr_create_on_demand) { - const char *flags_str = "none"; - uint8_t flags = g_hlr->subscr_create_on_demand_flags; - unsigned int rand_msisdn_len = g_hlr->subscr_create_on_demand_rand_msisdn_len; - - if ((flags & DB_SUBSCR_FLAG_NAM_CS) && (flags & DB_SUBSCR_FLAG_NAM_PS)) - flags_str = "cs+ps"; - else if (flags & DB_SUBSCR_FLAG_NAM_CS) - flags_str = "cs"; - else if (flags & DB_SUBSCR_FLAG_NAM_PS) - flags_str = "ps"; - - if (rand_msisdn_len) - vty_out(vty, " subscriber-create-on-demand %i %s%s", rand_msisdn_len, flags_str, VTY_NEWLINE); - else - vty_out(vty, " subscriber-create-on-demand no-msisdn %s%s", flags_str, VTY_NEWLINE); - } + config_write_subscr_create_on_demand(vty); return CMD_SUCCESS; } @@ -805,20 +819,25 @@ "Allow access to packet switched NAM by default.\n" "Allow access to circuit and packet switched NAM by default.\n") { + enum subscr_create_on_demand_mode mode; unsigned int rand_msisdn_len = 0; uint8_t flags = 0x00; - if (strcmp(argv[0], "no-msisdn") != 0) + if (strcmp(argv[0], "no-msisdn") == 0) { + mode = SUBSCR_COD_MODE_NO_MSISDN; + } else { /* random MSISDN */ + mode = SUBSCR_COD_MODE_RAND_MSISDN; rand_msisdn_len = atoi(argv[0]); + } if (strstr(argv[1], "cs")) flags |= DB_SUBSCR_FLAG_NAM_CS; if (strstr(argv[1], "ps")) flags |= DB_SUBSCR_FLAG_NAM_PS; - g_hlr->subscr_create_on_demand = true; - g_hlr->subscr_create_on_demand_rand_msisdn_len = rand_msisdn_len; - g_hlr->subscr_create_on_demand_flags = flags; + g_hlr->subscr_create_on_demand.mode = mode; + g_hlr->subscr_create_on_demand.rand_msisdn_len = rand_msisdn_len; + g_hlr->subscr_create_on_demand.flags = flags; return CMD_SUCCESS; } @@ -827,7 +846,7 @@ "no subscriber-create-on-demand", "Do not make a new record when a subscriber is first seen.\n") { - g_hlr->subscr_create_on_demand = false; + g_hlr->subscr_create_on_demand.mode = SUBSCR_COD_MODE_DISABLED; return CMD_SUCCESS; } diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 4aea638..02a5552 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -115,6 +115,7 @@ hlr store-imei database hlr_vty_test.db + no subscriber-create-on-demand gsup bind ip 127.0.0.1 ipa-name unnamed-HLR -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/37779?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ib553172655f83dad1ac0e0254615c8c207d79ca9 Gerrit-Change-Number: 37779 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-hlr[master]: subscriber-create-on-demand: add mode for MSISDN=IMSI
by laforge 23 Aug '24

23 Aug '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/37780?usp=email ) Change subject: subscriber-create-on-demand: add mode for MSISDN=IMSI ...................................................................... subscriber-create-on-demand: add mode for MSISDN=IMSI In may be desirable for some users to assign deterministic MSISDNs when subscriber-create-on-demand is enabled. This can be achieved by assigning MSISDN=IMSI. This commit adds a new mode for that. Change-Id: I3470492f5e46de7246d9a74e80c37f80f455d851 --- M include/osmocom/hlr/hlr.h M src/hlr.c M src/hlr_vty.c M tests/test_nodes.vty M tests/test_subscr_create_on_demand.vty 5 files changed, 20 insertions(+), 2 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index 4bdb5b0..a7cf61d 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -43,6 +43,7 @@ SUBSCR_COD_MODE_DISABLED = 0, SUBSCR_COD_MODE_NO_MSISDN, SUBSCR_COD_MODE_RAND_MSISDN, + SUBSCR_COD_MODE_MSISDN_FROM_IMSI, }; struct hlr { diff --git a/src/hlr.c b/src/hlr.c index 44c96b5..6f444aa 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -209,6 +209,9 @@ return -1; switch (g_hlr->subscr_create_on_demand.mode) { + case SUBSCR_COD_MODE_MSISDN_FROM_IMSI: + OSMO_STRLCPY_ARRAY(msisdn, imsi); + break; case SUBSCR_COD_MODE_RAND_MSISDN: if (generate_new_msisdn(msisdn, imsi, g_hlr->subscr_create_on_demand.rand_msisdn_len) != 0) return -1; diff --git a/src/hlr_vty.c b/src/hlr_vty.c index ae1e13e..2c7cd5b 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -288,6 +288,9 @@ const char *flags_str; switch (g_hlr->subscr_create_on_demand.mode) { + case SUBSCR_COD_MODE_MSISDN_FROM_IMSI: + vty_out(vty, " subscriber-create-on-demand msisdn-from-imsi"); + break; case SUBSCR_COD_MODE_RAND_MSISDN: vty_out(vty, " subscriber-create-on-demand %u", g_hlr->subscr_create_on_demand.rand_msisdn_len); @@ -810,9 +813,10 @@ } DEFUN(cfg_subscr_create_on_demand, cfg_subscr_create_on_demand_cmd, - "subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|cs+ps)", + "subscriber-create-on-demand (no-msisdn|msisdn-from-imsi|<3-15>) (none|cs|ps|cs+ps)", "Make a new record when a subscriber is first seen.\n" "Do not automatically assign MSISDN.\n" + "Assign MSISDN identical to subscriber's IMSI.\n" "Length of an automatically assigned MSISDN.\n" "Do not allow any NAM (Network Access Mode) by default.\n" "Allow access to circuit switched NAM by default.\n" @@ -825,6 +829,8 @@ if (strcmp(argv[0], "no-msisdn") == 0) { mode = SUBSCR_COD_MODE_NO_MSISDN; + } else if (strcmp(argv[0], "msisdn-from-imsi") == 0) { + mode = SUBSCR_COD_MODE_MSISDN_FROM_IMSI; } else { /* random MSISDN */ mode = SUBSCR_COD_MODE_RAND_MSISDN; rand_msisdn_len = atoi(argv[0]); diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty index 02a5552..6875416 100644 --- a/tests/test_nodes.vty +++ b/tests/test_nodes.vty @@ -73,7 +73,7 @@ reject-cause (not-found|no-proxy) (imsi-unknown|illegal-ms|plmn-not-allowed|la-not-allowed|roaming-not-allowed|no-suitable-cell-in-la|net-fail|congestion|auth-unacceptable|proto-error-unspec) store-imei no store-imei - subscriber-create-on-demand (no-msisdn|<3-15>) (none|cs|ps|cs+ps) + subscriber-create-on-demand (no-msisdn|msisdn-from-imsi|<3-15>) (none|cs|ps|cs+ps) no subscriber-create-on-demand OsmoHLR(config-hlr)# gsup diff --git a/tests/test_subscr_create_on_demand.vty b/tests/test_subscr_create_on_demand.vty index fb587ae..76c6769 100644 --- a/tests/test_subscr_create_on_demand.vty +++ b/tests/test_subscr_create_on_demand.vty @@ -10,6 +10,14 @@ subscriber-create-on-demand no-msisdn none ... +OsmoHLR(config-hlr)# subscriber-create-on-demand msisdn-from-imsi cs+ps +OsmoHLR(config-hlr)# show running-config +... +hlr +... + subscriber-create-on-demand msisdn-from-imsi cs+ps +... + OsmoHLR(config-hlr)# subscriber-create-on-demand 3 none OsmoHLR(config-hlr)# show running-config ... -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/37780?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3470492f5e46de7246d9a74e80c37f80f455d851 Gerrit-Change-Number: 37780 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-hlr[master]: subscriber-create-on-demand: add mode for MSISDN=IMSI
by laforge 23 Aug '24

23 Aug '24
Attention is currently required from: fixeria, neels. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-hlr/+/37780?usp=email ) Change subject: subscriber-create-on-demand: add mode for MSISDN=IMSI ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/37780?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3470492f5e46de7246d9a74e80c37f80f455d851 Gerrit-Change-Number: 37780 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 23 Aug 2024 06:54:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • ...
  • 148
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.