aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-12-14 09:00:24 +0100
committerHarald Welte <laforge@gnumonks.org>2009-12-14 09:00:24 +0100
commit648b6ce083e3826b5df912de61214961f4950321 (patch)
treeec44fd56bf84a4130b0a34251a9e35fc558d8534
parent37600be76cb022dbd51d768500613d9a8066990f (diff)
Add VTY setting for whether or not to sending MM INFO
-rw-r--r--openbsc/include/openbsc/gsm_data.h1
-rw-r--r--openbsc/src/gsm_04_08.c6
-rw-r--r--openbsc/src/vty_interface.c12
3 files changed, 17 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 57665386d..9bddd7aad 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -435,6 +435,7 @@ struct gsm_network {
enum gsm48_reject_value reject_cause;
int a5_encryption;
int neci;
+ int send_mm_info;
/* layer 4 */
int (*mncc_recv) (struct gsm_network *net, int msg_type, void *arg);
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index ce93f0130..9e01d9c70 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -299,8 +299,10 @@ static int gsm0408_authorize(struct gsm_lchan *lchan, struct msgb *msg)
db_subscriber_alloc_tmsi(lchan->subscr);
release_loc_updating_req(lchan);
rc = gsm0408_loc_upd_acc(msg->lchan, lchan->subscr->tmsi);
- /* send MM INFO with network name */
- rc = gsm48_tx_mm_info(msg->lchan);
+ if (lchan->ts->trx->bts->network->send_mm_info) {
+ /* send MM INFO with network name */
+ rc = gsm48_tx_mm_info(msg->lchan);
+ }
/* call subscr_update after putting the loc_upd_acc
* in the transmit queue, since S_SUBSCR_ATTACHED might
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index adef1480a..7b7f4d158 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -93,6 +93,8 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
VTY_NEWLINE);
vty_out(vty, " RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode),
VTY_NEWLINE);
+ vty_out(vty, " MM Info: %s%s", net->send_mm_info ? "On" : "Off",
+ VTY_NEWLINE);
}
DEFUN(show_net, show_net_cmd, "show network",
@@ -293,6 +295,7 @@ static int config_write_net(struct vty *vty)
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
VTY_NEWLINE);
+ vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
vty_out(vty, " timer t3101 %u%s", gsmnet->T3101, VTY_NEWLINE);
vty_out(vty, " timer t3103 %u%s", gsmnet->T3103, VTY_NEWLINE);
vty_out(vty, " timer t3105 %u%s", gsmnet->T3105, VTY_NEWLINE);
@@ -851,6 +854,15 @@ DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_mm_info, cfg_net_mm_info_cmd,
+ "mm info (0|1)",
+ "Whether to send MM INFO after LOC UPD ACCEPT")
+{
+ gsmnet->send_mm_info = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
#define DECLARE_TIMER(number) \
DEFUN(cfg_net_T##number, \
cfg_net_T##number##_cmd, \