From 1b1f6b20226c92e4beba171159ead8fb21713484 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 21 Jun 2019 21:07:45 +0200 Subject: bfd: T1183: add support for multihop multihop tells the 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). When using multi-hop mode echo-mode will not work (see RFC 5883 section 3). --- src/conf_mode/protocols_bfd.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3