summaryrefslogtreecommitdiff
path: root/bgpd/bgp_vty.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-08-29 15:11:52 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-08-29 15:14:07 +0300
commit7c4ed2a7196fcf1192de6f6f5521f49090722cfa (patch)
tree02b35043cd3f8f05c2a88d6adf2c7f57eb4a80fe /bgpd/bgp_vty.c
parentc4e030ac87687b15418df652f69e3959c58de0e2 (diff)
bgpd: Add a warning for the operator that keepalive was changed
``` donatas-pc(config-router)# timers bgp 8 12 % keeplive value 8 is larger than 1/3 of the holdtime, setting to 4 donatas-pc(config-router)# do sh run | include timers bgp timers bgp 4 12 donatas-pc(config-router)# ``` Closes https://github.com/FRRouting/frr/issues/14287 Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_vty.c')
-rw-r--r--bgpd/bgp_vty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 445dea92d5..daa8507e39 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -590,7 +590,7 @@ int bgp_get_vty(struct bgp **bgp, as_t *as, const char *name,
int ret = bgp_get(bgp, as, name, inst_type, as_pretty, asnotation);
if (ret == BGP_CREATED) {
- bgp_timers_set(*bgp, DFLT_BGP_KEEPALIVE, DFLT_BGP_HOLDTIME,
+ bgp_timers_set(NULL, *bgp, DFLT_BGP_KEEPALIVE, DFLT_BGP_HOLDTIME,
DFLT_BGP_CONNECT_RETRY, BGP_DEFAULT_DELAYOPEN);
if (DFLT_BGP_IMPORT_CHECK)
@@ -2661,7 +2661,7 @@ DEFUN (bgp_timers,
return CMD_WARNING_CONFIG_FAILED;
}
- bgp_timers_set(bgp, keepalive, holdtime, DFLT_BGP_CONNECT_RETRY,
+ bgp_timers_set(vty, bgp, keepalive, holdtime, DFLT_BGP_CONNECT_RETRY,
BGP_DEFAULT_DELAYOPEN);
return CMD_SUCCESS;
@@ -2677,7 +2677,7 @@ DEFUN (no_bgp_timers,
"Holdtime\n")
{
VTY_DECLVAR_CONTEXT(bgp, bgp);
- bgp_timers_set(bgp, DFLT_BGP_KEEPALIVE, DFLT_BGP_HOLDTIME,
+ bgp_timers_set(vty, bgp, DFLT_BGP_KEEPALIVE, DFLT_BGP_HOLDTIME,
DFLT_BGP_CONNECT_RETRY, BGP_DEFAULT_DELAYOPEN);
return CMD_SUCCESS;