diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-05-11 20:27:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-11 20:27:41 +0200 |
| commit | 86d13cb23df0e473c5e152fd050e136c228bfb1c (patch) | |
| tree | 2150a4eea7e84ec476a70ef5e71d7845b6d72093 /src | |
| parent | d529fd96c6a2033bdacd1fd7552014a4659ebe44 (diff) | |
| parent | 23a7841901d5b7e46f00c628fc1a0946197b3c5b (diff) | |
| download | vyos-1x-86d13cb23df0e473c5e152fd050e136c228bfb1c.tar.gz vyos-1x-86d13cb23df0e473c5e152fd050e136c228bfb1c.zip | |
Merge pull request #5171 from natali-rs1985/T8607
bgp: T8607: Add CLI support for BGP update-delay and establish-wait
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/protocols_bgp.py | 14 |
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(): |
