summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2026-05-06 11:41:57 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2026-05-11 12:24:43 +0300
commit23a7841901d5b7e46f00c628fc1a0946197b3c5b (patch)
tree5e22f7263ec4e4e391cbf88ed290a64fff291192 /src
parent7cf4d14610a021d13e1a54df05cf1bffc03f714b (diff)
downloadvyos-1x-23a7841901d5b7e46f00c628fc1a0946197b3c5b.tar.gz
vyos-1x-23a7841901d5b7e46f00c628fc1a0946197b3c5b.zip
bgp: T8607: Add CLI support for BGP update-delay and establish-wait
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 24e244bb9..53561a9a3 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -478,6 +478,20 @@ def verify(config_dict):
if not {'idle', 'interval', 'probes'} <= set(bgp['parameters']['tcp_keepalive']):
raise ConfigError('TCP keepalive incomplete - idle, keepalive and probes must be set')
+ # Validate BGP update-delay: 'establish-wait' requires 'max-delay' and must not exceed it
+ if dict_search('parameters.update_delay', bgp) != None:
+ update_delay = dict_search('parameters.update_delay.max_delay', bgp)
+ establish_wait = dict_search('parameters.update_delay.establish_wait', bgp)
+ if establish_wait is not None:
+ if update_delay is None:
+ raise ConfigError(
+ 'BGP update-delay establish-wait requires max-delay to be set!'
+ )
+ if int(establish_wait) > int(update_delay):
+ raise ConfigError(
+ 'BGP update-delay establish-wait cannot be greater than max-delay!'
+ )
+
# Address Family specific validation
if 'address_family' in bgp:
for afi, afi_config in bgp['address_family'].items():