diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2025-01-10 15:24:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 15:24:00 +0100 |
commit | d390f471f118c81e8c3ed14ee67f1282d3ca04e4 (patch) | |
tree | 92d4cee665f9d92590343b5dff4212101c9579be /bgpd | |
parent | Merge pull request #17811 from enkechen-panw/aggr-fix3 (diff) | |
parent | bgpd: Fix showing default `timers bgp x y` (diff) | |
download | frr-d390f471f118c81e8c3ed14ee67f1282d3ca04e4.tar.xz frr-d390f471f118c81e8c3ed14ee67f1282d3ca04e4.zip |
Merge pull request #17830 from opensourcerouting/fix/timers_bgp_default
bgpd: Fix showing default `timers bgp x y`
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_vty.c | 12 | ||||
-rw-r--r-- | bgpd/bgp_vty.h | 13 | ||||
-rw-r--r-- | bgpd/bgpd.c | 6 |
3 files changed, 16 insertions, 15 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index c6b09481b..56b06106f 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -93,18 +93,6 @@ FRR_CFG_DEFAULT_BOOL(BGP_DETERMINISTIC_MED, { .val_bool = true, .match_profile = "datacenter", }, { .val_bool = false }, ); -FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY, - { .val_ulong = 10, .match_profile = "datacenter", }, - { .val_ulong = BGP_DEFAULT_CONNECT_RETRY }, -); -FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME, - { .val_ulong = 9, .match_profile = "datacenter", }, - { .val_ulong = BGP_DEFAULT_KEEPALIVE }, -); -FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE, - { .val_ulong = 3, .match_profile = "datacenter", }, - { .val_ulong = BGP_DEFAULT_KEEPALIVE }, -); FRR_CFG_DEFAULT_BOOL(BGP_EBGP_REQUIRES_POLICY, { .val_bool = false, .match_profile = "datacenter", }, { .val_bool = false, .match_version = "< 7.4", }, diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index f88f5c812..00a313507 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -10,6 +10,19 @@ #include "stream.h" struct bgp; +FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE, + { .val_ulong = 3, .match_profile = "datacenter", }, + { .val_ulong = BGP_DEFAULT_KEEPALIVE }, +); +FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME, + { .val_ulong = 9, .match_profile = "datacenter", }, + { .val_ulong = BGP_DEFAULT_HOLDTIME }, +); +FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY, + { .val_ulong = 10, .match_profile = "datacenter", }, + { .val_ulong = BGP_DEFAULT_CONNECT_RETRY }, +); + #define BGP_INSTANCE_HELP_STR "BGP view\nBGP VRF\nView/VRF name\n" #define BGP_INSTANCE_ALL_HELP_STR "BGP view\nBGP VRF\nAll Views/VRFs\n" diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 05bc804db..02333db1c 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -583,9 +583,9 @@ void bgp_timers_set(struct vty *vty, struct bgp *bgp, uint32_t keepalive, /* mostly for completeness - CLI uses its own defaults */ void bgp_timers_unset(struct bgp *bgp) { - bgp->default_keepalive = BGP_DEFAULT_KEEPALIVE; - bgp->default_holdtime = BGP_DEFAULT_HOLDTIME; - bgp->default_connect_retry = BGP_DEFAULT_CONNECT_RETRY; + bgp->default_keepalive = DFLT_BGP_KEEPALIVE; + bgp->default_holdtime = DFLT_BGP_HOLDTIME; + bgp->default_connect_retry = DFLT_BGP_CONNECT_RETRY; bgp->default_delayopen = BGP_DEFAULT_DELAYOPEN; } |