summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-27 22:45:02 +0200
committerChristian Breunig <christian@breunig.cc>2023-03-27 22:47:02 +0200
commitb5d940d9f279a8391c8d8c56cc86f4855c9d38b5 (patch)
treed91e3e2c3bb508f0ae9b96645f7d19994ffd3a98 /src/conf_mode
parentd9fa39a370c06d8add22a7018d14984e5ac14fc8 (diff)
downloadvyos-1x-b5d940d9f279a8391c8d8c56cc86f4855c9d38b5.tar.gz
vyos-1x-b5d940d9f279a8391c8d8c56cc86f4855c9d38b5.zip
bgp: T5114: support configuring TCP keepalive messages
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py5
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():