Change in osmo-bsc[osmith/1.9.1]: fix bsc_vty_go_parent(): add missing case for MGW_NODE
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31243 ) Change subject: fix bsc_vty_go_parent(): add missing case for MGW_NODE ...................................................................... fix bsc_vty_go_parent(): add missing case for MGW_NODE A new VTY node was added in commit [1], but bsc_vty_go_parent() was not updated. Because of that, commands following the MGW node may crash osmo-bsc. In the example below: network network country code 901 mobile network code 70 ... mgw 0 remote-ip 127.0.0.1 local-ip 127.0.0.1 periodic location update 30 the 'periodic location update 30' will trigger a segfault: (gdb) bt #0 0x00005555555dfc09 in cfg_net_per_loc_upd () #1 0x00007ffff7af6c3f in cmd_execute_command_strict () from /usr/local/lib/libosmovty.so.9 #2 0x00007ffff7af6f1c in config_from_file () from /usr/local/lib/libosmovty.so.9 #3 0x00007ffff7afd4e1 in vty_read_config_filep () from /usr/local/lib/libosmovty.so.9 #4 0x00007ffff7afe375 in vty_read_config_file () from /usr/local/lib/libosmovty.so.9 #5 0x0000555555579616 in bsc_network_configure () #6 0x000055555557a352 in main () because vty->index would be NULL after returning from the MGW node. Fix this by adding the missing case to bsc_vty_go_parent(). Change-Id: Id3050ff7e2402c33ee76c7bf0cc83603c0cc6dfc Fixes: [1] 8d22e6870637ed6d392a8a77aeaebc51b23a8a50 (cherry picked from commit 57800ec48e0768ee66a897afd4f1a518ae6c3501) --- M src/osmo-bsc/osmo_bsc_main.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/43/31243/1 diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 920693f..82e7265 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -518,6 +518,11 @@ vty->node = CONFIG_NODE; vty->index = NULL; break; + case MGW_NODE: + vty->node = GSMNET_NODE; + vty->index = bsc_gsmnet; + vty->index_sub = NULL; + break; case BTS_NODE: vty->node = GSMNET_NODE; { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: osmith/1.9.1 Gerrit-Change-Id: Id3050ff7e2402c33ee76c7bf0cc83603c0cc6dfc Gerrit-Change-Number: 31243 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
osmith