diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-01-05 13:57:45 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-01-05 13:57:45 +0100 |
commit | 893ea65f381acc877f852e48894f4575904b7cf9 (patch) | |
tree | 77b795c436019640d0cf33583d37337b2f7e7900 /openbsc/src/vty_interface.c | |
parent | 64b811f11321a13138ec48edcd6cafae23fcc7ed (diff) |
[bsc_msc_ip] Turn the MNC hack into a config option
* Make it possible to have a different MNC in the RSL traffic
than in the core network.
* Introduce the "core network code NUMBER" variable. If it is
set this network code will be used in traffic with the MSC.
* Use the core_network_code number when sending a packet to
the MSC
* Regenerate the LAI (this is where I could have a bug) when
sending packets to the BTS.
* Add size checks.
This is not tested, I might got something wrong.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r-- | openbsc/src/vty_interface.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 582047763..78636aa7e 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -295,6 +295,8 @@ static int config_write_net(struct vty *vty) vty_out(vty, "network%s", VTY_NEWLINE); vty_out(vty, " network country code %u%s", gsmnet->country_code, VTY_NEWLINE); vty_out(vty, " mobile network code %u%s", gsmnet->network_code, VTY_NEWLINE); + if (gsmnet->core_network_code > 0) + vty_out(vty, " core mobile network code %u%s", gsmnet->core_network_code, VTY_NEWLINE); 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); @@ -853,6 +855,16 @@ DEFUN(cfg_net_mnc, return CMD_SUCCESS; } +DEFUN(cfg_core_net_mnc, + cfg_core_net_mnc_cmd, + "core mobile network code <1-999>", + "Set the GSM mobile network code to be used in the MSC connection") +{ + gsmnet->core_network_code = atoi(argv[0]); + + return CMD_SUCCESS; +} + DEFUN(cfg_net_name_short, cfg_net_name_short_cmd, "short name NAME", @@ -1585,6 +1597,7 @@ int bsc_vty_init(struct gsm_network *net) install_default(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ncc_cmd); install_element(GSMNET_NODE, &cfg_net_mnc_cmd); + install_element(GSMNET_NODE, &cfg_core_net_mnc_cmd); 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); |