diff options
author | Tim Ehlers <osmocom@ehlers.info> | 2012-02-14 23:54:25 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2012-02-14 23:54:25 +0100 |
commit | b4a8badc45a05283944859e2822a202197eed1c4 (patch) | |
tree | 0b549000918ad4539ff02bf9b31e7228bb16d955 /src/host/layer23/src/mobile/vty_interface.c | |
parent | 978ec28b718597b57344761a2423f4967c9343d3 (diff) |
mobile: Add vty option to force rekeying for every new channel
Written-by: Tim Ehlers <osmocom@ehlers.info>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index ca1c5828..dc9e09d9 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1300,6 +1300,9 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms) if (!hide_default || set->auto_answer) vty_out(vty, " %sauto-answer%s", (set->auto_answer) ? "" : "no ", VTY_NEWLINE); + if (!hide_default || set->force_rekey) + vty_out(vty, " %sforce-rekey%s", + (set->force_rekey) ? "" : "no ", VTY_NEWLINE); if (!hide_default || set->clip) vty_out(vty, " %sclip%s", (set->clip) ? "" : "no ", VTY_NEWLINE); @@ -1730,6 +1733,28 @@ DEFUN(cfg_auto_answer, cfg_ms_auto_answer_cmd, "auto-answer", return CMD_SUCCESS; } +DEFUN(cfg_no_force_rekey, cfg_ms_no_force_rekey_cmd, "no force-rekey", + NO_STR "Disable key renew forcing after every event") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->force_rekey = 0; + + return CMD_SUCCESS; +} + +DEFUN(cfg_force_rekey, cfg_ms_force_rekey_cmd, "force-rekey", + "Enable key renew forcing after every event") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + set->force_rekey = 1; + + return CMD_SUCCESS; +} + DEFUN(cfg_clip, cfg_ms_clip_cmd, "clip", "Force caller ID presentation") { @@ -2782,6 +2807,8 @@ int ms_vty_init(void) install_element(MS_NODE, &cfg_ms_no_cw_cmd); install_element(MS_NODE, &cfg_ms_auto_answer_cmd); install_element(MS_NODE, &cfg_ms_no_auto_answer_cmd); + install_element(MS_NODE, &cfg_ms_force_rekey_cmd); + install_element(MS_NODE, &cfg_ms_no_force_rekey_cmd); install_element(MS_NODE, &cfg_ms_clip_cmd); install_element(MS_NODE, &cfg_ms_clir_cmd); install_element(MS_NODE, &cfg_ms_no_clip_cmd); |