Projects
osmocom:latest
osmo-hlr
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
osmo-hlr.spec
Changed
@@ -15,13 +15,13 @@ Name: osmo-hlr Requires: osmocom-latest -Version: 1.4.0 +Version: 1.5.0 Release: 0 Summary: Osmocom Home Location Register for GSUP protocol towards OsmoSGSN and OsmoCSCN License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Productivity/Telephony/Servers URL: https://osmocom.org/projects/osmo-hlr -Source: osmo-hlr_1.4.0.tar.xz +Source: osmo-hlr_1.5.0.tar.xz BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -30,11 +30,11 @@ %if 0%{?suse_version} BuildRequires: systemd-rpm-macros %endif -BuildRequires: pkgconfig(libosmoabis) >= 1.1.0 -BuildRequires: pkgconfig(libosmocore) >= 1.5.0 -BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.5.0 -BuildRequires: pkgconfig(libosmovty) >= 1.5.0 +BuildRequires: pkgconfig(libosmoabis) >= 1.3.0 +BuildRequires: pkgconfig(libosmocore) >= 1.7.0 +BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 +BuildRequires: pkgconfig(libosmovty) >= 1.7.0 BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(talloc) >= 2.0.1 # only needed for populate_hlr_db.pl
View file
osmo-hlr_1.4.0.dsc -> osmo-hlr_1.5.0.dsc
Changed
@@ -1,14 +1,14 @@ Format: 3.0 (native) Source: osmo-hlr -Binary: osmo-hlr, osmo-hlr-dbg, libosmo-gsup-client0, libosmo-gsup-client-dev, libosmo-mslookup0, libosmo-mslookup-dev, osmo-hlr-doc +Binary: osmo-hlr, osmo-hlr-dbg, libosmo-gsup-client0, libosmo-gsup-client-dev, libosmo-mslookup0, libosmo-mslookup-dev, osmo-mslookup-utils, osmo-hlr-doc Architecture: any all -Version: 1.4.0 +Version: 1.5.0 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-hlr Standards-Version: 3.9.6 -Vcs-Browser: http://cgit.osmocom.org/osmo-hlr -Vcs-Git: git://git.osmocom.org/osmo-hlr -Build-Depends: debhelper (>= 9), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.5.0), libosmo-abis-dev (>= 1.1.0), libosmo-netif-dev (>= 1.1.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.1.0) +Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr +Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr +Build-Depends: debhelper (>= 9), pkg-config, dh-autoreconf, autotools-dev, python3-minimal, libosmocore-dev (>= 1.7.0), libosmo-abis-dev (>= 1.3.0), libosmo-netif-dev (>= 1.2.0), libsqlite3-dev, sqlite3, osmo-gsm-manuals-dev (>= 1.3.0) Package-List: libosmo-gsup-client-dev deb net optional arch=any libosmo-gsup-client0 deb libs optional arch=any @@ -17,9 +17,10 @@ osmo-hlr deb net optional arch=any osmo-hlr-dbg deb debug extra arch=any osmo-hlr-doc deb doc optional arch=all + osmo-mslookup-utils deb utils optional arch=any Checksums-Sha1: - b277ccc94f9ae1ae69b0e64be3f4bcf09a2a492a 169536 osmo-hlr_1.4.0.tar.xz + 0670110acba6b51b9e1f9f27cafb4cb0c7b1581a 171872 osmo-hlr_1.5.0.tar.xz Checksums-Sha256: - 103389ab0fdb433d258bd1afd8e4dec9e460467336ab41721d5b63e51ff9a71f 169536 osmo-hlr_1.4.0.tar.xz + 8cf694124d443619b05a12838e308b137a5b7a0c10766db01860cd8731c1dbb5 171872 osmo-hlr_1.5.0.tar.xz Files: - f9f234b357d3f272f1fa009645247e03 169536 osmo-hlr_1.4.0.tar.xz + b80a9edb0732c6c5b4c9b315a729bd8e 171872 osmo-hlr_1.5.0.tar.xz
View file
osmo-hlr_1.4.0.tar.xz/.tarball-version -> osmo-hlr_1.5.0.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.4.0 \ No newline at end of file +1.5.0 \ No newline at end of file
View file
osmo-hlr_1.4.0.tar.xz/README.md -> osmo-hlr_1.5.0.tar.xz/README.md
Changed
@@ -23,10 +23,9 @@ You can clone from the official osmo-hlr.git repository using - git clone git://git.osmocom.org/osmo-hlr.git - git clone https://git.osmocom.org/osmo-hlr.git + git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr -There is a cgit interface at https://git.osmocom.org/osmo-hlr/ +There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr> Documentation -------------
View file
osmo-hlr_1.4.0.tar.xz/configure.ac -> osmo-hlr_1.5.0.tar.xz/configure.ac
Changed
@@ -41,11 +41,11 @@ PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.1) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.5.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.5.0) -PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.5.0) -PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.5.0) -PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.1.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0) PKG_CHECK_MODULES(SQLITE3, sqlite3) @@ -107,7 +107,7 @@ AM_PATH_PYTHON AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes) if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then - AC_MSG_ERROR(Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.) + AC_MSG_ERROR(Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.) fi fi AC_MSG_CHECKING(whether to enable VTY/CTRL tests)
View file
osmo-hlr_1.4.0.tar.xz/contrib/osmo-hlr.spec.in -> osmo-hlr_1.5.0.tar.xz/contrib/osmo-hlr.spec.in
Changed
@@ -29,11 +29,11 @@ %if 0%{?suse_version} BuildRequires: systemd-rpm-macros %endif -BuildRequires: pkgconfig(libosmoabis) >= 1.1.0 -BuildRequires: pkgconfig(libosmocore) >= 1.5.0 -BuildRequires: pkgconfig(libosmoctrl) >= 1.5.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.5.0 -BuildRequires: pkgconfig(libosmovty) >= 1.5.0 +BuildRequires: pkgconfig(libosmoabis) >= 1.3.0 +BuildRequires: pkgconfig(libosmocore) >= 1.7.0 +BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 +BuildRequires: pkgconfig(libosmovty) >= 1.7.0 BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(talloc) >= 2.0.1 # only needed for populate_hlr_db.pl
View file
osmo-hlr_1.4.0.tar.xz/debian/changelog -> osmo-hlr_1.5.0.tar.xz/debian/changelog
Changed
@@ -1,3 +1,31 @@ +osmo-hlr (1.5.0) unstable; urgency=medium + + Oliver Smith + * treewide: remove FSF address + + Vadim Yanitskiy + * fixup: debian: remove unneeded dependency libdbd-sqlite3 + * debian: add new 'osmo-mslookup-utils' package + * tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS' + + Pau Espin Pedrol + * ctrl: Mark function as static + * tests: Allow specyfing specific ctrl test to run + * tests/ctrl: Move ERROR test scenario to proper file + * Fix db_subscr_create() not returning -EEXIST expected by VTY subscriber create cmd + * ctrl: Introduce cmd SET subscriber.create <imsi> + * ctrl: Introduce CTRL command subscriber.by-*.msisdn + * cosmetic: hlr_vty_subscr.c: Fix trailing whitespace + * ctrl: Introduce cmd SET subscriber.delete <imsi> + * ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo,ki> + * ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo,KI,(op|opc),OP_C,ind_bitlen> + * doc: Document new subscriber CTRL commands + + Harald Welte + * update git URLs (git -> https; gitea) + + -- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 28 Jun 2022 18:38:31 +0200 + osmo-hlr (1.4.0) unstable; urgency=medium Keith
View file
osmo-hlr_1.4.0.tar.xz/debian/control -> osmo-hlr_1.5.0.tar.xz/debian/control
Changed
@@ -7,20 +7,20 @@ dh-autoreconf, autotools-dev, python3-minimal, - libosmocore-dev (>= 1.5.0), - libosmo-abis-dev (>= 1.1.0), - libosmo-netif-dev (>= 1.1.0), + libosmocore-dev (>= 1.7.0), + libosmo-abis-dev (>= 1.3.0), + libosmo-netif-dev (>= 1.2.0), libsqlite3-dev, sqlite3, - osmo-gsm-manuals-dev (>= 1.1.0) + osmo-gsm-manuals-dev (>= 1.3.0) Standards-Version: 3.9.6 -Vcs-Browser: http://cgit.osmocom.org/osmo-hlr -Vcs-Git: git://git.osmocom.org/osmo-hlr +Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr +Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-hlr Homepage: https://projects.osmocom.org/projects/osmo-hlr Package: osmo-hlr Architecture: any -Depends: osmocom-latest, ${shlibs:Depends}, ${misc:Depends}, libdbd-sqlite3 +Depends: osmocom-latest, ${shlibs:Depends}, ${misc:Depends} Description: Osmocom Home Location Register OsmoHLR is a Osmocom implementation of HLR (Home Location Registrar) which works over GSUP protocol. The subscribers are store in sqlite DB. It supports both 2G and 3G authentication. @@ -80,6 +80,16 @@ . This package contains the development headers. +Package: osmo-mslookup-utils +Architecture: any +Section: utils +Depends: osmocom-latest, ${shlibs:Depends}, + libosmo-mslookup0 (= ${binary:Version}), + ${misc:Depends} +Multi-Arch: same +Description: Utilities for Osmocom MS lookup + This package contains a simple MS lookup client utility. + Package: osmo-hlr-doc Architecture: all Section: doc
View file
osmo-hlr_1.5.0.tar.xz/debian/osmo-mslookup-utils.install
Added
@@ -0,0 +1 @@ +usr/bin/osmo-mslookup-client
View file
osmo-hlr_1.4.0.tar.xz/doc/manuals/Makefile.am -> osmo-hlr_1.5.0.tar.xz/doc/manuals/Makefile.am
Changed
@@ -1,6 +1,10 @@ -EXTRA_DIST = example_subscriber_add_update_delete.vty \ +EXTRA_DIST = \ + example_subscriber_add_update_delete.vty \ + example_subscriber_aud2g.ctrl \ + example_subscriber_aud3g.ctrl \ example_subscriber_cs_ps_enabled.ctrl \ example_subscriber_info.ctrl \ + example_subscriber_msisdn.ctrl \ osmohlr-usermanual.adoc \ osmohlr-usermanual-docinfo.xml \ osmohlr-vty-reference.xml \
View file
osmo-hlr_1.4.0.tar.xz/doc/manuals/chapters/control.adoc -> osmo-hlr_1.5.0.tar.xz/doc/manuals/chapters/control.adoc
Changed
@@ -5,6 +5,16 @@ to all programs using it are described in <<ctrl_common_vars>>. This section describes the CTRL interface variables specific to OsmoHLR. +Subscribers can be created and deleted using the following SET commands: + +.Subscriber management commands available on OsmoHLR's Control interface +options="header",width="100%",cols="35%,65%" +|=== +|Command|Comment +|subscriber.create '123456'|Create a new subscriber with IMSI "123456" to the database. Returns database ID of the subscriber being created. +|subscriber.delete '123456'|Delete subscriber with IMSI "123456" from database. Returns database ID of the subscriber being deleted. +|=== + All subscriber variables are available by different selectors, which are freely interchangeable: @@ -28,6 +38,9 @@ |subscriber.by-\*.*info-all*|R|No||List both 'info' and 'info-aud' in one |subscriber.by-\*.*cs-enabled*|RW|No|'1' or '0'|Enable/disable circuit-switched access |subscriber.by-\*.*ps-enabled*|RW|No|'1' or '0'|Enable/disable packet-switched access +|subscriber.by-\*.*msisdn*|RW|No|valid MSISDN string|Get/Set assigned MSISDN +|subscriber.by-\*.*aud2g*|RW|No|'algo,KI'|Get/Set 2g Authentication Data +|subscriber.by-\*.*aud2g*|RW|No|'algo,KI,("op"|"opc"),OP_C,ind_bitlen'|Get/Set 3g Authentication Data |=== === subscriber.by-*.info, info-aud, info-all @@ -104,3 +117,63 @@ ---- include::../example_subscriber_cs_ps_enabled.ctrl ---- + +=== subscriber.by-*.msisdn + +Get or set the MSISDN currently assigned to a subscriber. + + +This is an example transcript that illustrates use of this command: + +---- +include::../example_subscriber_msisdn.ctrl +---- + +=== subscriber.by-*.aud2g + +Get or set the 2G Authentication data of a subscriber. + +The information is stored/retrieved as a comma separated list of fields: + +---- +algo,KI +---- + +Where:: +* *KI* is the KI as a hexadecimal string. +* *algo* is one of the following algorithms: _none, xor, comp128v1, comp128v2, + comp128v3_. + +All values are case insensitive. + +This is an example transcript that illustrates use of this command: + +---- +include::../example_subscriber_aud2g.ctrl +---- + +=== subscriber.by-*.aud3g + +Get or set the 3G Authentication data of a subscriber. + +The information is stored/retrieved as a comma separated list of fields: + +---- +algo,KI,("op"|"opc"),OP_C,ind_bitlen +---- + +Where: +* *KI* is the KI as a hexadecimal string. +* *algo* is one of the following algorithms: _none, xor, milenage_. +* "op" or "opc" indicates whether next field is an OP or OPC value. +* *OP_C* contains an OP or OPC values as hexadecimal string, based on what the + previous field specifies. +* *ind_bitlen* is set to 5 by default if not provided. + +All values are case insensitive. + +This is an example transcript that illustrates use of this command: + +---- +include::../example_subscriber_aud3g.ctrl +----
View file
osmo-hlr_1.5.0.tar.xz/doc/manuals/example_subscriber_aud2g.ctrl
Added
@@ -0,0 +1,14 @@ +GET 1 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 1 subscriber.by-imsi-901991234567891.aud2g none + +SET 2 subscriber.by-imsi-901991234567891.aud2g xor,c01ffedc1cadaeac1d1f1edacac1ab0a +SET_REPLY 2 subscriber.by-imsi-901991234567891.aud2g OK + +GET 3 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 3 subscriber.by-imsi-901991234567891.aud2g XOR,c01ffedc1cadaeac1d1f1edacac1ab0a + +SET 4 subscriber.by-imsi-901991234567891.aud2g none +SET_REPLY 4 subscriber.by-imsi-901991234567891.aud2g OK + +GET 5 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 5 subscriber.by-imsi-901991234567891.aud2g none
View file
osmo-hlr_1.5.0.tar.xz/doc/manuals/example_subscriber_aud3g.ctrl
Added
@@ -0,0 +1,20 @@ +GET 117 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 117 subscriber.by-imsi-901991234567891.aud3g none + +SET 118 subscriber.by-imsi-901991234567891.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OP,FB2A3D1B360F599ABAB99DB8669F8308 +SET_REPLY 118 subscriber.by-imsi-901991234567891.aud3g OK + +GET 119 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 119 subscriber.by-imsi-901991234567891.aud3g MILENAGE,c01ffedc1cadaeac1d1f1edacac1ab0a,OP,fb2a3d1b360f599abab99db8669f8308,5 + +SET 120 subscriber.by-imsi-901991234567891.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,FB2A3D1B360F599ABAB99DB8669F8308,7 +SET_REPLY 120 subscriber.by-imsi-901991234567891.aud3g OK + +GET 121 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 121 subscriber.by-imsi-901991234567891.aud3g MILENAGE,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,fb2a3d1b360f599abab99db8669f8308,7 + +SET 122 subscriber.by-imsi-901991234567891.aud3g none +SET_REPLY 122 subscriber.by-imsi-901991234567891.aud3g OK + +GET 123 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 123 subscriber.by-imsi-901991234567891.aud3g none
View file
osmo-hlr_1.5.0.tar.xz/doc/manuals/example_subscriber_msisdn.ctrl
Added
@@ -0,0 +1,8 @@ +GET 1 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 1 subscriber.by-imsi-901991234567891.msisdn none + +SET 2 subscriber.by-imsi-901991234567891.msisdn 555666 +SET_REPLY 2 subscriber.by-imsi-901991234567891.msisdn OK + +GET 3 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 3 subscriber.by-imsi-901991234567891.msisdn 555666
View file
osmo-hlr_1.4.0.tar.xz/include/osmocom/hlr/ctrl.h -> osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/ctrl.h
Changed
@@ -30,5 +30,4 @@ _LAST_CTRL_NODE_HLR }; -int hlr_ctrl_cmds_install(); struct ctrl_handle *hlr_controlif_setup(struct hlr *hlr);
View file
osmo-hlr_1.4.0.tar.xz/include/osmocom/hlr/hlr_vty.h -> osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/hlr_vty.h
Changed
@@ -37,6 +37,12 @@ MSLOOKUP_CLIENT_NODE, }; + +#define A38_XOR_MIN_KEY_LEN 12 +#define A38_XOR_MAX_KEY_LEN 16 +#define A38_COMP128_KEY_LEN 16 +#define MILENAGE_KEY_LEN 16 + int hlr_vty_is_config_node(struct vty *vty, int node); int hlr_vty_go_parent(struct vty *vty); void hlr_vty_init(void);
View file
osmo-hlr_1.4.0.tar.xz/include/osmocom/hlr/logging.h -> osmo-hlr_1.5.0.tar.xz/include/osmocom/hlr/logging.h
Changed
@@ -11,6 +11,7 @@ DMSLOOKUP, DLU, DDGSM, + DCTRL, }; extern const struct log_info hlr_log_info;
View file
osmo-hlr_1.4.0.tar.xz/src/ctrl.c -> osmo-hlr_1.5.0.tar.xz/src/ctrl.c
Changed
@@ -31,12 +31,16 @@ #include <osmocom/hlr/hlr.h> #include <osmocom/hlr/ctrl.h> #include <osmocom/hlr/db.h> +#include <osmocom/hlr/hlr_vty.h> #define SEL_BY "by-" #define SEL_BY_IMSI SEL_BY "imsi-" #define SEL_BY_MSISDN SEL_BY "msisdn-" #define SEL_BY_ID SEL_BY "id-" +extern bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, + int *minlen, int *maxlen); + #define hexdump_buf(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf)) static bool startswith(const char *str, const char *start) @@ -197,6 +201,77 @@ aud->u.umts.sqn); } +CTRL_CMD_DEFINE_WO_NOVRF(subscr_create, "create"); +static int set_subscr_create(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *imsi = cmd->value; + int rc; + + if (!osmo_imsi_str_valid(imsi)) { + cmd->reply = "Invalid IMSI value."; + return CTRL_CMD_ERROR; + } + + /* Create the subscriber in the DB */ + rc = db_subscr_create(g_hlr->dbc, imsi, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS); + if (rc) { + if (rc == -EEXIST) + cmd->reply = "Subscriber already exists."; + else + cmd->reply = "Cannot create subscriber."; + return CTRL_CMD_ERROR; + } + + LOGP(DCTRL, LOGL_INFO, "Created subscriber IMSI='%s'\n", + imsi); + + /* Retrieve data of newly created subscriber: */ + rc = db_subscr_get_by_imsi(hlr->dbc, imsi, &subscr); + if (rc < 0) { + cmd->reply = "Failed retrieving ID of newly created subscriber."; + return CTRL_CMD_ERROR; + } + + cmd->reply = talloc_asprintf(cmd, "%" PRIu64, subscr.id); + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(subscr_delete, "delete"); +static int set_subscr_delete(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *imsi = cmd->value; + int rc; + + if (!osmo_imsi_str_valid(imsi)) { + cmd->reply = "Invalid IMSI value."; + return CTRL_CMD_ERROR; + } + + /* Retrieve data of newly created subscriber: */ + rc = db_subscr_get_by_imsi(hlr->dbc, imsi, &subscr); + if (rc < 0) { + cmd->reply = "Subscriber doesn't exist."; + return CTRL_CMD_ERROR; + } + + /* Create the subscriber in the DB */ + rc = db_subscr_delete_by_id(g_hlr->dbc, subscr.id); + if (rc) { + cmd->reply = "Cannot delete subscriber."; + return CTRL_CMD_ERROR; + } + + LOGP(DCTRL, LOGL_INFO, "Deleted subscriber IMSI='%s'\n", + imsi); + + cmd->reply = talloc_asprintf(cmd, "%" PRIu64, subscr.id); + return CTRL_CMD_REPLY; +} + CTRL_CMD_DEFINE_RO(subscr_info, "info"); static int get_subscr_info(struct ctrl_cmd *cmd, void *data) { @@ -351,17 +426,302 @@ return set_subscr_cs_ps_enabled(cmd, data, false); } -int hlr_ctrl_cmds_install() +CTRL_CMD_DEFINE(subscr_msisdn, "msisdn"); +static int verify_subscr_msisdn(struct ctrl_cmd *cmd, const char *value, void *data) { - int rc = 0; + struct hlr_subscriber subscr; + if (!value) + return 1; + if (strlen(value) > sizeof(subscr.msisdn) - 1) + return 1; + if (strcmp(value, "none") != 0 && !osmo_msisdn_str_valid(value)) + return 1; + return 0; +} +static int get_subscr_msisdn(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; - rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info); - rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info_aud); - rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info_all); - rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_ps_enabled); - rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_cs_enabled); + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; - return rc; + if (strlen(subscr.msisdn) == 0) + snprintf(subscr.msisdn, sizeof(subscr.msisdn), "none"); + + cmd->reply = talloc_asprintf(cmd, "%s", subscr.msisdn); + return CTRL_CMD_REPLY; +} +static int set_subscr_msisdn(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; + const char *msisdn; + + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; + + if (strcmp(cmd->value, "none") == 0) + msisdn = NULL; + else + msisdn = cmd->value; + + if (db_subscr_update_msisdn_by_imsi(g_hlr->dbc, subscr.imsi, msisdn)) { + cmd->reply = "Update MSISDN failed"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +/* value format: <algo,KI> */ +CTRL_CMD_DEFINE(subscr_aud2g, "aud2g"); +static int verify_subscr_aud2g(struct ctrl_cmd *cmd, const char *value, void *data) +{ + if (!value) + return 1; + if (strcasecmp(value, "none") != 0 && !strchr(value, ',')) + return 1; + return 0; +} +static int get_subscr_aud2g(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; + struct osmo_sub_auth_data aud2g; + struct osmo_sub_auth_data aud3g_unused; + int rc; + + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; + + rc = db_get_auth_data(hlr->dbc, subscr.imsi, &aud2g, &aud3g_unused, NULL); + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: + aud2g.algo = OSMO_AUTH_ALG_NONE; + break; + default: + cmd->reply = "Error retrieving data from database."; + return CTRL_CMD_ERROR; + } + + if (aud2g.algo == OSMO_AUTH_ALG_NONE) { + cmd->reply = "none"; + return CTRL_CMD_REPLY; + } + + cmd->reply = talloc_asprintf(cmd, "%s,%s", osmo_auth_alg_name(aud2g.algo), + hexdump_buf(aud2g.u.gsm.ki)); + return CTRL_CMD_REPLY; +} +static int set_subscr_aud2g(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; + char *tmp = NULL, *tok, *saveptr; + int minlen = 0; + int maxlen = 0; + struct sub_auth_data_str aud2g = { + .type = OSMO_AUTH_TYPE_GSM + }; + + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; + + tmp = talloc_strdup(cmd, cmd->value); + if (!tmp) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + /* Parse alg_type: */ + tok = strtok_r(tmp, ",", &saveptr); + if (!tok) { + cmd->reply = "Invalid format"; + return CTRL_CMD_ERROR; + } + if (strcmp(tok, "none") == 0) { + aud2g.algo = OSMO_AUTH_ALG_NONE; + } else if (!auth_algo_parse(tok, &aud2g.algo, &minlen, &maxlen)) { + cmd->reply = "Unknown auth algorithm."; + return CTRL_CMD_ERROR; + } + + if (aud2g.algo != OSMO_AUTH_ALG_NONE) { + tok = strtok_r(NULL, "\0", &saveptr); + if (!tok) { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + aud2g.u.gsm.ki = tok; + if (!osmo_is_hexstr(aud2g.u.gsm.ki, minlen * 2, maxlen * 2, true)) { + cmd->reply = "Invalid KI."; + return CTRL_CMD_ERROR; + } + } + + if (db_subscr_update_aud_by_id(g_hlr->dbc, subscr.id, &aud2g)) { + cmd->reply = "Update aud2g failed."; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +/* value format: <algo,KI,(op|opc),OP_C,ind_bitlen> */ +CTRL_CMD_DEFINE(subscr_aud3g, "aud3g"); +static int verify_subscr_aud3g(struct ctrl_cmd *cmd, const char *value, void *data) +{ + if (!value) + return 1; + if (strcasecmp(value, "none") != 0 && !strchr(value, ',')) + return 1; + return 0; +} +static int get_subscr_aud3g(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; + struct osmo_sub_auth_data aud2g_unused; + struct osmo_sub_auth_data aud3g; + int rc; + + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; + + rc = db_get_auth_data(hlr->dbc, subscr.imsi, &aud2g_unused, &aud3g, NULL); + switch (rc) { + case 0: + break; + case -ENOENT: + case -ENOKEY: + aud3g.algo = OSMO_AUTH_ALG_NONE; + break; + default: + cmd->reply = "Error retrieving data from database."; + return CTRL_CMD_ERROR; + } + + if (aud3g.algo == OSMO_AUTH_ALG_NONE) { + cmd->reply = "none"; + return CTRL_CMD_REPLY; + } + + cmd->reply = talloc_asprintf(cmd, "%s,%s,%s,%s,%u", osmo_auth_alg_name(aud3g.algo), + osmo_hexdump_nospc_c(cmd, aud3g.u.umts.k, sizeof(aud3g.u.umts.k)), + aud3g.u.umts.opc_is_op ? "OP" : "OPC", + osmo_hexdump_nospc_c(cmd, aud3g.u.umts.opc, sizeof(aud3g.u.umts.opc)), + aud3g.u.umts.ind_bitlen); + return CTRL_CMD_REPLY; +} +static int set_subscr_aud3g(struct ctrl_cmd *cmd, void *data) +{ + struct hlr_subscriber subscr; + struct hlr *hlr = data; + const char *by_selector = cmd->node; + char *tmp = NULL, *tok, *saveptr; + int minlen = 0; + int maxlen = 0; + struct sub_auth_data_str aud3g = { + .type = OSMO_AUTH_TYPE_UMTS, + .u.umts = { + .ind_bitlen = 5, + }, + }; + bool ind_bitlen_present; + + if (!get_subscriber(hlr->dbc, by_selector, &subscr, cmd)) + return CTRL_CMD_ERROR; + + tmp = talloc_strdup(cmd, cmd->value); + if (!tmp) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + /* Parse alg_type: */ + tok = strtok_r(tmp, ",", &saveptr); + if (!tok) { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + if (strcmp(tok, "none") == 0) { + aud3g.algo = OSMO_AUTH_ALG_NONE; + } else if (!auth_algo_parse(tok, &aud3g.algo, &minlen, &maxlen)) { + cmd->reply = "Unknown auth algorithm."; + return CTRL_CMD_ERROR; + } + + if (aud3g.algo != OSMO_AUTH_ALG_NONE) { + /* Parse K */ + tok = strtok_r(NULL, ",", &saveptr); + if (!tok) { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + aud3g.u.umts.k = tok; + if (!osmo_is_hexstr(aud3g.u.umts.k, minlen * 2, maxlen * 2, true)) { + cmd->reply = "Invalid KI."; + return CTRL_CMD_ERROR; + } + + /* Parse OP/OPC choice */ + tok = strtok_r(NULL, ",", &saveptr); + if (!tok) { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + if (strcasecmp(tok, "op") == 0) { + aud3g.u.umts.opc_is_op = true; + } else if (strcasecmp(tok, "opc") == 0) { + aud3g.u.umts.opc_is_op = false; + } else { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + + /* Parse OP/OPC value */ + ind_bitlen_present = !!strchr(saveptr, ','); + tok = strtok_r(NULL, ind_bitlen_present ? "," : "\0", &saveptr); + if (!tok) { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + + aud3g.u.umts.opc = tok; + if (!osmo_is_hexstr(aud3g.u.umts.opc, MILENAGE_KEY_LEN * 2, MILENAGE_KEY_LEN * 2, true)) { + cmd->reply = talloc_asprintf(cmd, "Invalid OP/OPC."); + return CTRL_CMD_ERROR; + } + + if (ind_bitlen_present) { + /* Parse bitlen_ind */ + tok = strtok_r(NULL, "\0", &saveptr); + if (!tok || tok0 == '\0') { + cmd->reply = "Invalid format."; + return CTRL_CMD_ERROR; + } + aud3g.u.umts.ind_bitlen = atoi(tok); + } + } + + if (db_subscr_update_aud_by_id(g_hlr->dbc, subscr.id, &aud3g)) { + cmd->reply = "Update aud3g failed."; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; } static int hlr_ctrl_node_lookup(void *data, vector vline, int *node_type, @@ -389,6 +749,25 @@ return 1; } +static int hlr_ctrl_cmds_install() +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR, &cmd_subscr_create); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR, &cmd_subscr_delete); + + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info_aud); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_info_all); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_ps_enabled); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_cs_enabled); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_msisdn); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_aud2g); + rc |= ctrl_cmd_install(CTRL_NODE_SUBSCR_BY, &cmd_subscr_aud3g); + + return rc; +} + struct ctrl_handle *hlr_controlif_setup(struct hlr *hlr) { int rc;
View file
osmo-hlr_1.4.0.tar.xz/src/db_hlr.c -> osmo-hlr_1.5.0.tar.xz/src/db_hlr.c
Changed
@@ -45,7 +45,8 @@ * \paramin,out dbc database context. * \paramin imsi ASCII string of IMSI digits, is validated. * \paramin flags Bitmask of DB_SUBSCR_FLAG_*. - * \returns 0 on success, -EINVAL on invalid IMSI, -EIO on database error. + * \returns 0 on success, -EINVAL on invalid IMSI, -EEXIST if subscriber with + * provided imsi already exists, -EIO on other database errors. */ int db_subscr_create(struct db_context *dbc, const char *imsi, uint8_t flags) { @@ -73,6 +74,8 @@ if (rc != SQLITE_DONE) { LOGHLR(imsi, LOGL_ERROR, "Cannot create subscriber: SQL error: (%d) %s\n", rc, sqlite3_errmsg(dbc->db)); + if (rc == SQLITE_CONSTRAINT_UNIQUE) + return -EEXIST; return -EIO; }
View file
osmo-hlr_1.4.0.tar.xz/src/dbd_decode_binary.c -> osmo-hlr_1.5.0.tar.xz/src/dbd_decode_binary.c
Changed
@@ -18,10 +18,6 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * $Id: dbd_helper.c,v 1.44 2011/08/09 11:14:14 mhoenicka Exp $ */
View file
osmo-hlr_1.4.0.tar.xz/src/hlr_vty_subscr.c -> osmo-hlr_1.5.0.tar.xz/src/hlr_vty_subscr.c
Changed
@@ -31,6 +31,7 @@ #include <osmocom/hlr/hlr.h> #include <osmocom/hlr/db.h> #include <osmocom/hlr/timestamp.h> +#include <osmocom/hlr/hlr_vty.h> struct vty; @@ -346,7 +347,7 @@ int rc; struct hlr_subscriber subscr; const char *imsi = argv0; - + if (!osmo_imsi_str_valid(imsi)) { vty_out(vty, "%% Not a valid IMSI: %s%s", imsi, VTY_NEWLINE); return CMD_WARNING; @@ -470,14 +471,8 @@ #define AUTH_ALG_TYPES_3G_HELP \ "Use Milenage algorithm\n" -#define A38_XOR_MIN_KEY_LEN 12 -#define A38_XOR_MAX_KEY_LEN 16 -#define A38_COMP128_KEY_LEN 16 - -#define MILENAGE_KEY_LEN 16 - -static bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, - int *minlen, int *maxlen) +bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, + int *minlen, int *maxlen) { if (!strcasecmp(alg_str, "none")) { *algo = OSMO_AUTH_ALG_NONE; @@ -636,7 +631,7 @@ .ind_bitlen = ind_bitlen, }, }; - + if (!auth_algo_parse(alg_type, &aud3g.algo, &minlen, &maxlen)) { vty_out(vty, "%% Unknown auth algorithm: '%s'%s", alg_type, VTY_NEWLINE); return CMD_WARNING;
View file
osmo-hlr_1.4.0.tar.xz/src/logging.c -> osmo-hlr_1.5.0.tar.xz/src/logging.c
Changed
@@ -43,6 +43,12 @@ .color = "\0331;35m", .enabled = 1, .loglevel = LOGL_NOTICE, }, + DCTRL = { + .name = "DCTRL", + .description = "Osmocom CTRL interface", + .color = "\0331;30m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, }; const struct log_info hlr_log_info = {
View file
osmo-hlr_1.4.0.tar.xz/tests/Makefile.am -> osmo-hlr_1.5.0.tar.xz/tests/Makefile.am
Changed
@@ -69,6 +69,9 @@ CTRL_TEST_DB = hlr_ctrl_test.db +# Run a specific test with: 'make ctrl-test CTRL_TEST=test_subscriber.ctrl' +CTRL_TEST ?= *.ctrl + # To update the CTRL script from current application behavior, # pass -u to ctrl_script_runner.py by doing: # make ctrl-test U=-u @@ -79,7 +82,7 @@ osmo_verify_transcript_ctrl.py -v \ -p 4259 \ -r "$(top_builddir)/src/osmo-hlr -c $(top_srcdir)/doc/examples/osmo-hlr.cfg -l $(CTRL_TEST_DB)" \ - $(U) $(srcdir)/*.ctrl + $(U) $(srcdir)/$(CTRL_TEST) -rm -f $(CTRL_TEST_DB) -rm $(CTRL_TEST_DB)-*
View file
osmo-hlr_1.4.0.tar.xz/tests/auc/Makefile.am -> osmo-hlr_1.5.0.tar.xz/tests/auc/Makefile.am
Changed
@@ -23,9 +23,7 @@ auc_ts_55_205_test_sets.err \ $(NULL) -check_PROGRAMS = auc_ts_55_205_test_sets - -noinst_PROGRAMS = auc_test +check_PROGRAMS = auc_test auc_ts_55_205_test_sets auc_test_SOURCES = \ auc_test.c \
View file
osmo-hlr_1.4.0.tar.xz/tests/db/db_test.c -> osmo-hlr_1.5.0.tar.xz/tests/db/db_test.c
Changed
@@ -262,13 +262,13 @@ ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), 0); ASSERT_SEL(imsi, imsi2, 0); id2 = g_subscr.id; - ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EEXIST); ASSERT_SEL(imsi, imsi0, 0); - ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); - ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EEXIST); + ASSERT_RC(db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EEXIST); ASSERT_SEL(imsi, imsi1, 0); - ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); - ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EIO); + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EEXIST); + ASSERT_RC(db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EEXIST); ASSERT_SEL(imsi, imsi2, 0); ASSERT_RC(db_subscr_create(dbc, "123456789 000003", DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS), -EINVAL);
View file
osmo-hlr_1.4.0.tar.xz/tests/db/db_test.err -> osmo-hlr_1.5.0.tar.xz/tests/db/db_test.err
Changed
@@ -27,7 +27,7 @@ .imsi = '123456789000002', } -db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO +db_subscr_create(dbc, imsi0, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EEXIST DAUC IMSI='123456789000000': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi0, &g_subscr) --> 0 @@ -36,10 +36,10 @@ .imsi = '123456789000000', } -db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EEXIST DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi -db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO +db_subscr_create(dbc, imsi1, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EEXIST DAUC IMSI='123456789000001': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi1, &g_subscr) --> 0 @@ -48,10 +48,10 @@ .imsi = '123456789000001', } -db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EEXIST DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi -db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EIO +db_subscr_create(dbc, imsi2, DB_SUBSCR_FLAG_NAM_CS | DB_SUBSCR_FLAG_NAM_PS) --> -EEXIST DAUC IMSI='123456789000002': Cannot create subscriber: SQL error: (2067) UNIQUE constraint failed: subscriber.imsi db_subscr_get_by_imsi(dbc, imsi2, &g_subscr) --> 0
View file
osmo-hlr_1.4.0.tar.xz/tests/gsup/Makefile.am -> osmo-hlr_1.5.0.tar.xz/tests/gsup/Makefile.am
Changed
@@ -17,7 +17,7 @@ gsup_test.err \ $(NULL) -noinst_PROGRAMS = \ +check_PROGRAMS = \ gsup_test \ $(NULL)
View file
osmo-hlr_1.4.0.tar.xz/tests/test_subscriber.ctrl -> osmo-hlr_1.5.0.tar.xz/tests/test_subscriber.ctrl
Changed
@@ -610,5 +610,102 @@ periodic_rau_tau_timer 0 lmsi 00000000 -GET 101 subscriber.by-id-0x0123.info -ERROR 101 Invalid value part of 'by-xxx-value' selector. +SET 101 subscriber.create 901991234567891 +SET_REPLY 101 subscriber.create 124 + +GET 102 subscriber.by-id-124.info +GET_REPLY 102 subscriber.by-id-124.info +id 124 +imsi 901991234567891 +nam_cs 1 +nam_ps 1 +ms_purged_cs 0 +ms_purged_ps 0 +periodic_lu_timer 0 +periodic_rau_tau_timer 0 +lmsi 00000000 + +GET 103 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 103 subscriber.by-imsi-901991234567891.msisdn none + +SET 104 subscriber.by-imsi-901991234567891.msisdn 555666 +SET_REPLY 104 subscriber.by-imsi-901991234567891.msisdn OK + +GET 105 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 105 subscriber.by-imsi-901991234567891.msisdn 555666 + +SET 106 subscriber.by-imsi-901991234567891.msisdn 888000 +SET_REPLY 106 subscriber.by-imsi-901991234567891.msisdn OK + +GET 107 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 107 subscriber.by-imsi-901991234567891.msisdn 888000 + +GET 108 subscriber.by-imsi-901991234567891.info +GET_REPLY 108 subscriber.by-imsi-901991234567891.info +id 124 +imsi 901991234567891 +msisdn 888000 +nam_cs 1 +nam_ps 1 +ms_purged_cs 0 +ms_purged_ps 0 +periodic_lu_timer 0 +periodic_rau_tau_timer 0 +lmsi 00000000 + +SET 109 subscriber.by-imsi-901991234567891.msisdn none +SET_REPLY 109 subscriber.by-imsi-901991234567891.msisdn OK + +GET 110 subscriber.by-imsi-901991234567891.msisdn +GET_REPLY 110 subscriber.by-imsi-901991234567891.msisdn none + +GET 111 subscriber.by-imsi-901991234567891.info +GET_REPLY 111 subscriber.by-imsi-901991234567891.info +id 124 +imsi 901991234567891 +nam_cs 1 +nam_ps 1 +ms_purged_cs 0 +ms_purged_ps 0 +periodic_lu_timer 0 +periodic_rau_tau_timer 0 +lmsi 00000000 + +GET 112 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 112 subscriber.by-imsi-901991234567891.aud2g none + +SET 113 subscriber.by-imsi-901991234567891.aud2g xor,c01ffedc1cadaeac1d1f1edacac1ab0a +SET_REPLY 113 subscriber.by-imsi-901991234567891.aud2g OK + +GET 114 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 114 subscriber.by-imsi-901991234567891.aud2g XOR,c01ffedc1cadaeac1d1f1edacac1ab0a + +SET 115 subscriber.by-imsi-901991234567891.aud2g none +SET_REPLY 115 subscriber.by-imsi-901991234567891.aud2g OK + +GET 116 subscriber.by-imsi-901991234567891.aud2g +GET_REPLY 116 subscriber.by-imsi-901991234567891.aud2g none + +GET 117 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 117 subscriber.by-imsi-901991234567891.aud3g none + +SET 118 subscriber.by-imsi-901991234567891.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OP,FB2A3D1B360F599ABAB99DB8669F8308 +SET_REPLY 118 subscriber.by-imsi-901991234567891.aud3g OK + +GET 119 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 119 subscriber.by-imsi-901991234567891.aud3g MILENAGE,c01ffedc1cadaeac1d1f1edacac1ab0a,OP,fb2a3d1b360f599abab99db8669f8308,5 + +SET 120 subscriber.by-imsi-901991234567891.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,FB2A3D1B360F599ABAB99DB8669F8308,7 +SET_REPLY 120 subscriber.by-imsi-901991234567891.aud3g OK + +GET 121 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 121 subscriber.by-imsi-901991234567891.aud3g MILENAGE,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,fb2a3d1b360f599abab99db8669f8308,7 + +SET 122 subscriber.by-imsi-901991234567891.aud3g none +SET_REPLY 122 subscriber.by-imsi-901991234567891.aud3g OK + +GET 123 subscriber.by-imsi-901991234567891.aud3g +GET_REPLY 123 subscriber.by-imsi-901991234567891.aud3g none + +SET 124 subscriber.delete 901991234567891 +SET_REPLY 124 subscriber.delete 124
View file
osmo-hlr_1.4.0.tar.xz/tests/test_subscriber_errors.ctrl -> osmo-hlr_1.5.0.tar.xz/tests/test_subscriber_errors.ctrl
Changed
@@ -105,3 +105,51 @@ ERROR 46 Invalid value part of 'by-xxx-value' selector. GET 47 subscriber.by-imsi-1234567890123456.cs-enabled ERROR 47 Invalid value part of 'by-xxx-value' selector. + +GET 48 subscriber.by-id-0x0123.info +ERROR 48 Invalid value part of 'by-xxx-value' selector. + +SET 49 subscriber.create zzz +ERROR 49 Invalid IMSI value. + +SET 50 subscriber.create 901990000000001 +ERROR 50 Subscriber already exists. + +SET 51 subscriber.by-imsi-1234567890123456.msisdn hellobadmsisdn +ERROR 51 Value failed verification. + +SET 52 subscriber.delete 100000 +ERROR 52 Subscriber doesn't exist. + +SET 53 subscriber.delete zzz +ERROR 53 Invalid IMSI value. + +SET 54 subscriber.by-imsi-901990000000003.aud2g foobar +ERROR 54 Value failed verification. + +SET 55 subscriber.by-imsi-901990000000003.aud2g foobar,2134 +ERROR 55 Unknown auth algorithm. + +SET 56 subscriber.by-imsi-901990000000003.aud2g xor,2134 +ERROR 56 Invalid KI. + +SET 57 subscriber.by-imsi-901990000000003.aud3g foobar +ERROR 57 Value failed verification. + +SET 58 subscriber.by-imsi-901990000000003.aud3g foobar,2134 +ERROR 58 Unknown auth algorithm. + +SET 60 subscriber.by-imsi-901990000000003.aud3g milenage,2134 +ERROR 60 Invalid KI. + +SET 61 subscriber.by-imsi-901990000000003.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,AAA +ERROR 61 Invalid format. + +SET 62 subscriber.by-imsi-901990000000003.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC +ERROR 62 Invalid format. + +SET 63 subscriber.by-imsi-901990000000003.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,zzz +ERROR 63 Invalid OP/OPC. + +SET 64 subscriber.by-imsi-901990000000003.aud3g milenage,c01ffedc1cadaeac1d1f1edacac1ab0a,OPC,fb2a3d1b360f599abab99db8669f8308, +ERROR 64 Invalid format.
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.