summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bfd.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-06-22 14:51:44 +0200
committerChristian Poessinger <christian@poessinger.com>2019-06-22 14:53:34 +0200
commit4e4b945b6b88308fe8938663ad12efebf98e08fd (patch)
treef4f6318efcf4843b82c185687c566f7fbda95ab4 /src/conf_mode/protocols_bfd.py
parentc2a8c1a22f432265c73606106046c02e995eb630 (diff)
downloadvyos-1x-4e4b945b6b88308fe8938663ad12efebf98e08fd.tar.gz
vyos-1x-4e4b945b6b88308fe8938663ad12efebf98e08fd.zip
bfd: T1183: add support to configure detection multiplier
Configures the detection multiplier to determine packet loss. The remote transmission interval will be multiplied by this value to determine the connection loss detection timer. The default value is 3. Example: when the local system has detect-multiplier 3 and the remote system has transmission interval 300, the local system will detect failures only after 900 milliseconds without receiving packets.
Diffstat (limited to 'src/conf_mode/protocols_bfd.py')
-rwxr-xr-xsrc/conf_mode/protocols_bfd.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py
index 6d2b8382a..96a41de11 100755
--- a/src/conf_mode/protocols_bfd.py
+++ b/src/conf_mode/protocols_bfd.py
@@ -36,6 +36,7 @@ bfd
!
{% for peer in new_peers -%}
peer {{ peer.remote }}{% if peer.multihop %} multihop{% endif %}{% if peer.src_addr %} local-address {{ peer.src_addr }}{% endif %}{% if peer.src_if %} interface {{ peer.src_if }}{% endif %}
+ detect-multiplier {{ peer.multiplier }}
{% if not peer.shutdown %}no {% endif %}shutdown
{% endfor -%}
!
@@ -66,6 +67,7 @@ def get_config():
'shutdown': False,
'src_if': '',
'src_addr': '',
+ 'multiplier': '3',
'multihop': False
}
@@ -81,6 +83,12 @@ def get_config():
if conf.exists('source address'):
bfd_peer['src_addr'] = conf.return_value('source address')
+ # Configures the detection multiplier to determine packet loss. The remote
+ # transmission interval will be multiplied by this value to determine the
+ # connection loss detection timer. The default value is 3.
+ if conf.exists('multiplier'):
+ bfd_peer['multiplier'] = conf.return_value('multiplier')
+
# Tell BFD daemon that we should expect packets with TTL less than 254
# (because it will take more than one hop) and to listen on the multihop
# port (4784)