location updating reject cause now specified on VTY rather than command line argument
This commit is contained in:
parent
7fc57adf16
commit
1085c097e3
|
@ -748,7 +748,6 @@ struct gsm_trans;
|
|||
|
||||
/* config options controlling the behaviour of the lower leves */
|
||||
void gsm0408_allow_everyone(int allow);
|
||||
void gsm0408_set_reject_cause(int cause);
|
||||
|
||||
int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id);
|
||||
void gsm0408_generate_lai(struct gsm48_loc_area_id *lai48, u_int16_t mcc,
|
||||
|
|
|
@ -425,6 +425,7 @@ struct gsm_network {
|
|||
char *name_long;
|
||||
char *name_short;
|
||||
enum gsm_auth_policy auth_policy;
|
||||
enum gsm48_reject_value reject_cause;
|
||||
int a5_encryption;
|
||||
int neci;
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@ static void print_help()
|
|||
printf(" -s --disable-color\n");
|
||||
printf(" -c --config-file filename The config file to use.\n");
|
||||
printf(" -l --database db-name The database to use\n");
|
||||
printf(" -r --reject-cause number The reject cause for LOCATION UPDATING REJECT.\n");
|
||||
printf(" -p --pcap file The filename of the pcap file\n");
|
||||
printf(" -T --timestamp Prefix every log line with a timestamp\n");
|
||||
}
|
||||
|
@ -89,7 +88,6 @@ static void handle_options(int argc, char** argv)
|
|||
{"disable-color", 0, 0, 's'},
|
||||
{"database", 1, 0, 'l'},
|
||||
{"authorize-everyone", 0, 0, 'a'},
|
||||
{"reject-cause", 1, 0, 'r'},
|
||||
{"pcap", 1, 0, 'p'},
|
||||
{"timestamp", 0, 0, 'T'},
|
||||
{"rtp-proxy", 0, 0, 'P'},
|
||||
|
@ -118,9 +116,6 @@ static void handle_options(int argc, char** argv)
|
|||
case 'c':
|
||||
config_file = strdup(optarg);
|
||||
break;
|
||||
case 'r':
|
||||
gsm0408_set_reject_cause(atoi(optarg));
|
||||
break;
|
||||
case 'p':
|
||||
create_pcap_file(optarg);
|
||||
break;
|
||||
|
|
|
@ -241,12 +241,6 @@ struct gsm_lai {
|
|||
u_int16_t lac;
|
||||
};
|
||||
|
||||
static int reject_cause = 0;
|
||||
void gsm0408_set_reject_cause(int cause)
|
||||
{
|
||||
reject_cause = cause;
|
||||
}
|
||||
|
||||
static u_int32_t new_callref = 0x80000001;
|
||||
|
||||
static int authorize_subscriber(struct gsm_loc_updating_operation *loc,
|
||||
|
@ -978,9 +972,10 @@ static int mm_rx_id_resp(struct msgb *msg)
|
|||
static void loc_upd_rej_cb(void *data)
|
||||
{
|
||||
struct gsm_lchan *lchan = data;
|
||||
struct gsm_bts *bts = lchan->ts->trx->bts;
|
||||
|
||||
release_loc_updating_req(lchan);
|
||||
gsm0408_loc_upd_rej(lchan, reject_cause);
|
||||
gsm0408_loc_upd_rej(lchan, bts->network->reject_cause);
|
||||
lchan_auto_release(lchan);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,8 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
|
|||
net->name_short, VTY_NEWLINE);
|
||||
vty_out(vty, " Authentication policy: %s%s",
|
||||
gsm_auth_policy_name(net->auth_policy), VTY_NEWLINE);
|
||||
vty_out(vty, " Location updating reject cause: %u%s",
|
||||
net->reject_cause, VTY_NEWLINE);
|
||||
vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption,
|
||||
VTY_NEWLINE);
|
||||
vty_out(vty, " NECI (TCH/H): %u%s", net->neci,
|
||||
|
@ -273,6 +275,8 @@ static int config_write_net(struct vty *vty)
|
|||
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
|
||||
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
|
||||
vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE);
|
||||
vty_out(vty, " location updating reject cause %u%s",
|
||||
gsmnet->reject_cause, VTY_NEWLINE);
|
||||
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
|
||||
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
|
||||
vty_out(vty, " timer t3101 %u%s", gsmnet->T3101, VTY_NEWLINE);
|
||||
|
@ -792,6 +796,16 @@ DEFUN(cfg_net_auth_policy,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_reject_cause,
|
||||
cfg_net_reject_cause_cmd,
|
||||
"location updating reject cause <2-111>",
|
||||
"Set the reject cause of location updating reject\n")
|
||||
{
|
||||
gsmnet->reject_cause = atoi(argv[0]);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(cfg_net_encryption,
|
||||
cfg_net_encryption_cmd,
|
||||
"encryption a5 (0|1|2)",
|
||||
|
@ -1292,6 +1306,7 @@ int bsc_vty_init(struct gsm_network *net)
|
|||
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_neci_cmd);
|
||||
install_element(GSMNET_NODE, &cfg_net_T3101_cmd);
|
||||
|
|
Loading…
Reference in New Issue