@@ -18,6 +18,11 @@ struct gsm_subscriber_group;
#define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
+enum gsm_subscr_ext_alloc_policy {
+ GSM_SUBSCR_DONT_CREATE = 0,
+ GSM_SUBSCR_RANDOM_EXT = 1,
+};
+
enum gsm_security_event {
GSM_SECURITY_NOAVAIL,
GSM_SECURITY_AUTH_FAILED,
@@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod
INIT_LLIST_HEAD(&net->bsc_data->mscs);
net->subscr_group->net = net;
- net->create_subscriber = 1;
+ net->create_subscriber = GSM_SUBSCR_RANDOM_EXT;
net->country_code = country_code;
net->network_code = network_code;
@@ -1036,7 +1036,7 @@ DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd,
"Make a new record when a subscriber is first seen.\n")
{
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
- gsmnet->create_subscriber = 1;
+ gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT;
return CMD_SUCCESS;
}
@@ -1045,7 +1045,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd,
NO_STR "Make a new record when a subscriber is first seen.\n")
{
struct gsm_network *gsmnet = gsmnet_from_vty(vty);
- gsmnet->create_subscriber = 0;
+ gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE;
return CMD_SUCCESS;
}
From: Max <msuraev@sysmocom.de> This enables easier expansion of available policies in future. --- openbsc/include/openbsc/gsm_data.h | 5 +++++ openbsc/src/libbsc/net_init.c | 2 +- openbsc/src/libmsc/vty_interface_layer3.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-)