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 -----
  • 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

June 2022

  • 3 participants
  • 1374 discussions
Change in osmo-hlr[master]: doc: Document new subscriber CTRL commands
by pespin 21 Jun '22

21 Jun '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28398 ) Change subject: doc: Document new subscriber CTRL commands ...................................................................... doc: Document new subscriber CTRL commands Related: SYS#5993 Change-Id: I3e38d067bbc2ebb7f788dc56a5d56e1e4cafdc9c --- M doc/manuals/Makefile.am M doc/manuals/chapters/control.adoc A doc/manuals/example_subscriber_aud2g.ctrl A doc/manuals/example_subscriber_aud3g.ctrl A doc/manuals/example_subscriber_msisdn.ctrl 5 files changed, 120 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/doc/manuals/Makefile.am b/doc/manuals/Makefile.am index e3a76ad..e43e3ca 100644 --- a/doc/manuals/Makefile.am +++ b/doc/manuals/Makefile.am @@ -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 \ diff --git a/doc/manuals/chapters/control.adoc b/doc/manuals/chapters/control.adoc index 50fd314..0ab5b3e 100644 --- a/doc/manuals/chapters/control.adoc +++ b/doc/manuals/chapters/control.adoc @@ -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[] +---- diff --git a/doc/manuals/example_subscriber_aud2g.ctrl b/doc/manuals/example_subscriber_aud2g.ctrl new file mode 100644 index 0000000..e60c53b --- /dev/null +++ b/doc/manuals/example_subscriber_aud2g.ctrl @@ -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 diff --git a/doc/manuals/example_subscriber_aud3g.ctrl b/doc/manuals/example_subscriber_aud3g.ctrl new file mode 100644 index 0000000..f422d90 --- /dev/null +++ b/doc/manuals/example_subscriber_aud3g.ctrl @@ -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 diff --git a/doc/manuals/example_subscriber_msisdn.ctrl b/doc/manuals/example_subscriber_msisdn.ctrl new file mode 100644 index 0000000..3b6e9ac --- /dev/null +++ b/doc/manuals/example_subscriber_msisdn.ctrl @@ -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 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28398 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3e38d067bbc2ebb7f788dc56a5d56e1e4cafdc9c Gerrit-Change-Number: 28398 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo[,KI,(op|opc)...
by pespin 21 Jun '22

21 Jun '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28397 ) Change subject: ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo[,KI,(op|opc),OP_C[,ind_bitlen]]> ...................................................................... ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo[,KI,(op|opc),OP_C[,ind_bitlen]]> This command provides getter and setter to set and retrieve the authentication data for 3g subscribers. Change-Id: Ibe7aeec3cabab0406eb7a84ecd24e529ef1696c2 Related: SYS#5993 --- M include/osmocom/hlr/hlr_vty.h M src/ctrl.c M src/hlr_vty_subscr.c M tests/test_subscriber.ctrl M tests/test_subscriber_errors.ctrl 5 files changed, 200 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/hlr/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h index c026d91..10eddc3 100644 --- a/include/osmocom/hlr/hlr_vty.h +++ b/include/osmocom/hlr/hlr_vty.h @@ -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); diff --git a/src/ctrl.c b/src/ctrl.c index c543559..f101d25 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -31,6 +31,7 @@ #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-" @@ -576,6 +577,153 @@ 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 || tok[0] == '\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, void **node_data, int *i) { @@ -615,6 +763,7 @@ 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; } diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index a9f461d..c851062 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -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; @@ -470,12 +471,6 @@ #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 - bool auth_algo_parse(const char *alg_str, enum osmo_auth_algo *algo, int *minlen, int *maxlen) { diff --git a/tests/test_subscriber.ctrl b/tests/test_subscriber.ctrl index dadad35..ff26d4c 100644 --- a/tests/test_subscriber.ctrl +++ b/tests/test_subscriber.ctrl @@ -686,5 +686,26 @@ GET 116 subscriber.by-imsi-901991234567891.aud2g GET_REPLY 116 subscriber.by-imsi-901991234567891.aud2g none -SET 117 subscriber.delete 901991234567891 -SET_REPLY 117 subscriber.delete 124 +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 diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index ac9eec7..6b1ade6 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -132,3 +132,24 @@ 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. 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibe7aeec3cabab0406eb7a84ecd24e529ef1696c2 Gerrit-Change-Number: 28397 Gerrit-PatchSet: 2 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]>
by pespin 21 Jun '22

21 Jun '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28396 ) Change subject: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]> ...................................................................... ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]> This command provides getter and setter to set and retrieve the authentication data for 2g subscribers. Change-Id: Ibebac232fa173bce8a075cacf477214d5bdb590f Related: SYS#5993 --- M src/ctrl.c M src/hlr_vty_subscr.c M tests/test_subscriber.ctrl M tests/test_subscriber_errors.ctrl 4 files changed, 132 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/ctrl.c b/src/ctrl.c index 562ee75..c543559 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -37,6 +37,9 @@ #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) @@ -473,6 +476,106 @@ 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; +} + static int hlr_ctrl_node_lookup(void *data, vector vline, int *node_type, void **node_data, int *i) { @@ -511,6 +614,7 @@ 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); return rc; } diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 3813393..a9f461d 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -476,8 +476,8 @@ #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; diff --git a/tests/test_subscriber.ctrl b/tests/test_subscriber.ctrl index 889f0a7..dadad35 100644 --- a/tests/test_subscriber.ctrl +++ b/tests/test_subscriber.ctrl @@ -671,5 +671,20 @@ periodic_rau_tau_timer 0 lmsi 00000000 -SET 112 subscriber.delete 901991234567891 -SET_REPLY 112 subscriber.delete 124 +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 + +SET 117 subscriber.delete 901991234567891 +SET_REPLY 117 subscriber.delete 124 diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index 403e0fa..ac9eec7 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -123,3 +123,12 @@ 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. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28396 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibebac232fa173bce8a075cacf477214d5bdb590f Gerrit-Change-Number: 28396 Gerrit-PatchSet: 2 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]>
by fixeria 21 Jun '22

21 Jun '22
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28396 ) Change subject: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]> ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File src/hlr_vty_subscr.c: https://gerrit.osmocom.org/c/osmo-hlr/+/28396/comment/2df3ea97_1728bd74 PS1, Line 480: int *minlen, int *maxlen) > Alignment should be fixed. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28396 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibebac232fa173bce8a075cacf477214d5bdb590f Gerrit-Change-Number: 28396 Gerrit-PatchSet: 2 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 21 Jun 2022 08:39:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-cbc[master]: cbsp_server.h: Move function to the proper section
by fixeria 21 Jun '22

21 Jun '22
Attention is currently required from: osmith, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28298 ) Change subject: cbsp_server.h: Move function to the proper section ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File src/cbsp_server.h: https://gerrit.osmocom.org/c/osmo-cbc/+/28298/comment/5fb89924_0565e31d PS1, Line 24: }; > I would leave an empty line (like it's done below) for consistency. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28298 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-cbc Gerrit-Branch: master Gerrit-Change-Id: I47f694c2ffa1df50394ff01977ddb85768657062 Gerrit-Change-Number: 28298 Gerrit-PatchSet: 2 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 21 Jun 2022 08:39:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]>
by pespin 21 Jun '22

21 Jun '22
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hlr/+/28396 to look at the new patch set (#2). Change subject: ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]> ...................................................................... ctrl: Introduce CTRL command subscriber.by-*.aud2g <algo[,ki]> This command provides getter and setter to set and retrieve the authentication data for 2g subscribers. Change-Id: Ibebac232fa173bce8a075cacf477214d5bdb590f Related: SYS#5993 --- M src/ctrl.c M src/hlr_vty_subscr.c M tests/test_subscriber.ctrl M tests/test_subscriber_errors.ctrl 4 files changed, 132 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/96/28396/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28396 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibebac232fa173bce8a075cacf477214d5bdb590f Gerrit-Change-Number: 28396 Gerrit-PatchSet: 2 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-hlr[master]: cosmetic: hlr_vty_subscr.c: Fix trailing whitespace
by pespin 21 Jun '22

21 Jun '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28394 ) Change subject: cosmetic: hlr_vty_subscr.c: Fix trailing whitespace ...................................................................... cosmetic: hlr_vty_subscr.c: Fix trailing whitespace Change-Id: Id751d227a52f39e3a8874d8b78c633b8d3eb9e74 --- M src/hlr_vty_subscr.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c index 82e0043..3813393 100644 --- a/src/hlr_vty_subscr.c +++ b/src/hlr_vty_subscr.c @@ -346,7 +346,7 @@ int rc; struct hlr_subscriber subscr; const char *imsi = argv[0]; - + if (!osmo_imsi_str_valid(imsi)) { vty_out(vty, "%% Not a valid IMSI: %s%s", imsi, VTY_NEWLINE); return CMD_WARNING; @@ -636,7 +636,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; -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28394 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id751d227a52f39e3a8874d8b78c633b8d3eb9e74 Gerrit-Change-Number: 28394 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce cmd SET subscriber.delete <imsi>
by pespin 21 Jun '22

21 Jun '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28395 ) Change subject: ctrl: Introduce cmd SET subscriber.delete <imsi> ...................................................................... ctrl: Introduce cmd SET subscriber.delete <imsi> On success SET_REPLY contains the ID of the deleted subscriber. Related: SYS#5993 Change-Id: I24c6149d7c223a12549d712a7929666220c0210f --- M src/ctrl.c M tests/test_subscriber.ctrl M tests/test_subscriber_errors.ctrl 3 files changed, 44 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/ctrl.c b/src/ctrl.c index aa02a0e..562ee75 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -234,6 +234,40 @@ 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) { @@ -469,6 +503,7 @@ 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); diff --git a/tests/test_subscriber.ctrl b/tests/test_subscriber.ctrl index 5b49702..889f0a7 100644 --- a/tests/test_subscriber.ctrl +++ b/tests/test_subscriber.ctrl @@ -670,3 +670,6 @@ periodic_lu_timer 0 periodic_rau_tau_timer 0 lmsi 00000000 + +SET 112 subscriber.delete 901991234567891 +SET_REPLY 112 subscriber.delete 124 diff --git a/tests/test_subscriber_errors.ctrl b/tests/test_subscriber_errors.ctrl index 8309e61..403e0fa 100644 --- a/tests/test_subscriber_errors.ctrl +++ b/tests/test_subscriber_errors.ctrl @@ -117,3 +117,9 @@ 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. -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28395 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I24c6149d7c223a12549d712a7929666220c0210f Gerrit-Change-Number: 28395 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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-hlr[master]: doc: Document new subscriber CTRL commands
by laforge 21 Jun '22

21 Jun '22
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28398 ) Change subject: doc: Document new subscriber CTRL commands ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28398 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I3e38d067bbc2ebb7f788dc56a5d56e1e4cafdc9c Gerrit-Change-Number: 28398 Gerrit-PatchSet: 2 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 21 Jun 2022 08:14:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo[,KI,(op|opc)...
by laforge 21 Jun '22

21 Jun '22
Attention is currently required from: pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28397 ) Change subject: ctrl: Introduce CTRL command subscriber.by-*.aud3g <algo[,KI,(op|opc),OP_C[,ind_bitlen]]> ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/28397 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ibe7aeec3cabab0406eb7a84ecd24e529ef1696c2 Gerrit-Change-Number: 28397 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 21 Jun 2022 08:14:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.