fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/42847?usp=email )
(
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: server: vty: validate rotate-localtime modulus against the new interval ......................................................................
server: vty: validate rotate-localtime modulus against the new interval
apply_rotate_localtime() computed the maximum allowed modulus from pcap_server->rotate_localtime.intv, the currently-stored (old) interval, rather than the intv argument being applied. On first configuration the stored interval is the default 0, so the switch hit the default case and rejected an otherwise valid command; when changing intervals the modulus was bounds-checked against the wrong interval. Switch on intv instead.
Change-Id: I0b367d4e255db3208b41e12adec682026b99cc18 AI-Assisted: yes (Claude) --- M src/osmo_server_vty.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/osmo_server_vty.c b/src/osmo_server_vty.c index f96df7f..afdfcd8 100644 --- a/src/osmo_server_vty.c +++ b/src/osmo_server_vty.c @@ -289,7 +289,7 @@ static int apply_rotate_localtime(struct vty *vty, enum time_interval intv, unsigned int modulus) { unsigned int max_mod = 0; - switch (pcap_server->rotate_localtime.intv) { + switch (intv) { case TIME_INTERVAL_SEC: max_mod = 60; break;