vty: Fix cmd 'no echo-interval' doing nothing

It was incorrectly implemented and in practice was a NOOP.

Change-Id: I5e03c4965d05871d3f2e56675da6e75af0ec18c2
This commit is contained in:
Pau Espin 2022-02-25 17:24:07 +01:00
parent 46f04343a5
commit 134ac7e7c8
1 changed files with 1 additions and 2 deletions

View File

@ -389,10 +389,9 @@ DEFUN(cfg_ggsn_no_echo_interval, cfg_ggsn_no_echo_interval_cmd,
NO_STR "Send an echo request to this static GGSN every interval.\n")
{
struct ggsn_ctx *ggsn = (struct ggsn_ctx *) vty->index;
int prev_interval = ggsn->cfg.echo_interval;
struct sgsn_peer *sgsn;
if (prev_interval == ggsn->cfg.echo_interval)
if (ggsn->cfg.echo_interval == 0)
return CMD_SUCCESS;
ggsn->cfg.echo_interval = 0;