summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-02-01 21:01:58 +0000
committerGitHub <noreply@github.com>2024-02-01 21:01:58 +0000
commita685e55f3a1b215f422a2a84db351fe95c3331e4 (patch)
tree5660de632f0e10430d777b8d17a346c67496713a /src
parent1bc8d96f664a92ccfd657ac645c0c329bc720359 (diff)
parente559ff4e552a0959287bee7712d887e754b25fb7 (diff)
downloadvyos-1x-a685e55f3a1b215f422a2a84db351fe95c3331e4.tar.gz
vyos-1x-a685e55f3a1b215f422a2a84db351fe95c3331e4.zip
Merge pull request #2920 from c-po/bfd-equuleus-T5967
bfd: T5967: add minimum-ttl option
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bfd.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py
index d1e551cad..19076068d 100755
--- a/src/conf_mode/protocols_bfd.py
+++ b/src/conf_mode/protocols_bfd.py
@@ -51,6 +51,7 @@ def get_bfd_peer_config(peer, conf_mode="proposed"):
'multihop': False,
'echo_interval': '',
'echo_mode': False,
+ 'minimum_ttl': None,
}
# Check if individual peer is disabled
@@ -113,6 +114,12 @@ def get_bfd_peer_config(peer, conf_mode="proposed"):
if conf_mode == "proposed" and conf.exists('echo-mode'):
bfd_peer['echo_mode'] = True
+ # Enables or disables the echo transmission mode
+ if conf_mode == "effective" and conf.exists_effective('minimum-ttl'):
+ bfd_peer['minimum_ttl'] = conf.return_effective_value('minimum-ttl')
+ if conf_mode == "proposed" and conf.exists('minimum-ttl'):
+ bfd_peer['minimum_ttl'] = conf.return_value('minimum-ttl')
+
return bfd_peer
def get_config():
@@ -173,6 +180,9 @@ def verify(bfd):
if peer['echo_interval'] != '' and not peer['echo_mode']:
raise ConfigError('echo-interval can be configured only with enabled echo-mode')
+ if peer['minimum_ttl'] != None and peer['multihop'] != True:
+ raise ConfigError('Minimum TTL is only available for multihop BFD sessions!')
+
# check if we deleted peers are not used in configuration
if conf.exists('protocols bgp'):
bgp_as = conf.list_nodes('protocols bgp')[0]