aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-10 12:43:59 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-07-13 11:51:52 +0200
commita83850c7fdd6f4a2cfbd5267bc64fd12cd8dd2b5 (patch)
tree4d91ef7837641ee0df503ccd2599999233503aa9
parent2cc6c4ef2636ad7e7fc050ab9f9c6e5422ac5523 (diff)
vty: Add cmd to disable echo loop explictly
-rw-r--r--src/gprs/sgsn_vty.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index 9f9332c3..8092158f 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -185,6 +185,9 @@ static int config_write_sgsn(struct vty *vty)
if (gctx->echo_interval != -1)
vty_out(vty, " ggsn %u echo-interval %"PRId32"%s",
gctx->id, gctx->echo_interval, VTY_NEWLINE);
+ else
+ vty_out(vty, " ggsn %u no echo-interval%s",
+ gctx->id, VTY_NEWLINE);
}
if (sgsn->cfg.dynamic_lookup)
@@ -380,6 +383,19 @@ DEFUN(cfg_ggsn_echo_interval, cfg_ggsn_echo_interval_cmd,
return CMD_SUCCESS;
}
+DEFUN(cfg_ggsn_no_echo_interval, cfg_ggsn_no_echo_interval_cmd,
+ "ggsn <0-255> no echo-interval",
+ GGSN_STR "GGSN Number\n"
+ NO_STR "Send an echo request to this static GGSN every interval.\n")
+{
+ uint32_t id = atoi(argv[0]);
+ struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id);
+
+ ggc->echo_interval = -1;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_ggsn_dynamic_lookup, cfg_ggsn_dynamic_lookup_cmd,
"ggsn dynamic",
GGSN_STR
@@ -1302,6 +1318,7 @@ int sgsn_vty_init(struct sgsn_config *cfg)
//install_element(SGSN_NODE, &cfg_ggsn_remote_port_cmd);
install_element(SGSN_NODE, &cfg_ggsn_gtp_version_cmd);
install_element(SGSN_NODE, &cfg_ggsn_echo_interval_cmd);
+ install_element(SGSN_NODE, &cfg_ggsn_no_echo_interval_cmd);
install_element(SGSN_NODE, &cfg_imsi_acl_cmd);
install_element(SGSN_NODE, &cfg_auth_policy_cmd);
install_element(SGSN_NODE, &cfg_encrypt_cmd);