diff options
author | Christian Breunig <christian@breunig.cc> | 2023-03-27 22:45:02 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-03-27 22:47:02 +0200 |
commit | b5d940d9f279a8391c8d8c56cc86f4855c9d38b5 (patch) | |
tree | d91e3e2c3bb508f0ae9b96645f7d19994ffd3a98 /src/conf_mode/protocols_bgp.py | |
parent | d9fa39a370c06d8add22a7018d14984e5ac14fc8 (diff) | |
download | vyos-1x-b5d940d9f279a8391c8d8c56cc86f4855c9d38b5.tar.gz vyos-1x-b5d940d9f279a8391c8d8c56cc86f4855c9d38b5.zip |
bgp: T5114: support configuring TCP keepalive messages
Diffstat (limited to 'src/conf_mode/protocols_bgp.py')
-rwxr-xr-x | src/conf_mode/protocols_bgp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py index 4f05957fa..cf553f0e8 100755 --- a/src/conf_mode/protocols_bgp.py +++ b/src/conf_mode/protocols_bgp.py @@ -412,6 +412,11 @@ def verify(bgp): raise ConfigError('Missing mandatory configuration option for '\ f'global administrative distance {key}!') + # TCP keepalive requires all three parameters to be set + if dict_search('parameters.tcp_keepalive', bgp) != None: + if not {'idle', 'interval', 'probes'} <= set(bgp['parameters']['tcp_keepalive']): + raise ConfigError('TCP keepalive incomplete - idle, keepalive and probes must be set') + # Address Family specific validation if 'address_family' in bgp: for afi, afi_config in bgp['address_family'].items(): |