summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_bfd.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/protocols_bfd.py')
-rwxr-xr-xsrc/conf_mode/protocols_bfd.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py
index 08d3991ff..92fae990e 100755
--- a/src/conf_mode/protocols_bfd.py
+++ b/src/conf_mode/protocols_bfd.py
@@ -35,7 +35,7 @@ bfd
{% endfor -%}
!
{% for peer in new_peers -%}
- peer {{ peer.remote }}{% if peer.local_address %} local-address {{ peer.local_address }}{% endif %}{% if peer.local_interface %} interface {{ peer.local_interface }}{% endif %}
+ peer {{ peer.remote }}{% if peer.multihop %} multihop{% endif %}{% if peer.local_address %} local-address {{ peer.local_address }}{% endif %}{% if peer.local_interface %} interface {{ peer.local_interface }}{% endif %}
{% if not peer.shutdown %}no {% endif %}shutdown
{% endfor -%}
!
@@ -66,6 +66,7 @@ def get_config():
'shutdown': False,
'local_interface': '',
'local_address': '',
+ 'multihop': False
}
# Check if individual peer is disabled
@@ -80,6 +81,12 @@ def get_config():
if conf.exists('local-address'):
bfd_peer['local_address'] = conf.return_value('local-address')
+ # 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)
+ if conf.exists('multihop'):
+ bfd_peer['multihop'] = True
+
bfd['new_peers'].append(bfd_peer)
return bfd