matanp has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35484?usp=email )
Change subject: vty: Ensure radio-link-timeout is a multiple of 4 ......................................................................
vty: Ensure radio-link-timeout is a multiple of 4
According to Table 10.5.2.3.1 in TS 144.018, radio-link-timeout values are between 4 to 64 in steps of 4.
Change-Id: I733591d5f72f2e4f822761ca9eda85de7a4c6c81 --- M src/osmo-bsc/bts_vty.c 1 file changed, 20 insertions(+), 1 deletion(-)
Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified matanp: Looks good to me, approved
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index ef8b8bd..54eb5cf 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -1481,8 +1481,15 @@ "Radio link timeout value (lost SACCH block)\n") { struct gsm_bts *bts = vty->index; + unsigned int radio_link_timeout = atoi(argv[0]);
- gsm_bts_set_radio_link_timeout(bts, atoi(argv[0])); + /* According to Table 10.5.2.3.1 in TS 144.018 */ + if (radio_link_timeout % 4 != 0) { + vty_out(vty, "%% Radio link timeout must be a multiple of 4%s", VTY_NEWLINE); + return CMD_WARNING; + } + + gsm_bts_set_radio_link_timeout(bts, radio_link_timeout);
return CMD_SUCCESS; }