summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-12 10:11:49 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-12 11:09:20 +0100
commit6fab523565015fd4da5d7295bad684cb969e5d12 (patch)
treea557473e1cb3d6643c7de90edacc7dabd99003f4
parentaca9d98c818407b8009bb861ec0f5a817a9a5637 (diff)
downloadvyos-1x-6fab523565015fd4da5d7295bad684cb969e5d12.tar.gz
vyos-1x-6fab523565015fd4da5d7295bad684cb969e5d12.zip
bgp: T4069: add "parameters suppress-fib-pending" CLI option
This command is applicable at the global level and at an individual bgp level. If applied at the global level all bgp instances will wait for fib installation before announcing routes and there is no way to turn it off for a particular BGP vrf.
-rw-r--r--data/templates/frr/bgpd.frr.tmpl5
-rw-r--r--interface-definitions/include/bgp/protocol-common-config.xml.i8
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py4
3 files changed, 14 insertions, 3 deletions
diff --git a/data/templates/frr/bgpd.frr.tmpl b/data/templates/frr/bgpd.frr.tmpl
index 01e62a94b..9bb42fd2d 100644
--- a/data/templates/frr/bgpd.frr.tmpl
+++ b/data/templates/frr/bgpd.frr.tmpl
@@ -543,8 +543,11 @@ router bgp {{ local_as }} {{ 'vrf ' ~ vrf if vrf is defined and vrf is not none
{% if parameters.shutdown is defined %}
bgp shutdown
{% endif %}
+{% if parameters.suppress_fib_pending is defined %}
+ bgp suppress-fib-pending
+{% endif %}
{% endif %}
{% if timers is defined and timers.keepalive is defined and timers.holdtime is defined %}
timers bgp {{ timers.keepalive }} {{ timers.holdtime }}
{% endif %}
-exit \ No newline at end of file
+exit
diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i
index 2b2d6fa82..8214d0779 100644
--- a/interface-definitions/include/bgp/protocol-common-config.xml.i
+++ b/interface-definitions/include/bgp/protocol-common-config.xml.i
@@ -1442,6 +1442,12 @@
<valueless/>
</properties>
</leafNode>
+ <leafNode name="suppress-fib-pending">
+ <properties>
+ <help>Advertise only routes that are programmed in kernel to peers</help>
+ <valueless/>
+ </properties>
+ </leafNode>
#include <include/router-id.xml.i>
</children>
</node>
@@ -1491,4 +1497,4 @@
#include <include/bgp/timers-keepalive.xml.i>
</children>
</node>
-<!-- include end --> \ No newline at end of file
+<!-- include end -->
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 74aff71eb..a2bcd0685 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -246,6 +246,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.cli_set(base_path + ['parameters', 'minimum-holdtime', min_hold_time])
self.cli_set(base_path + ['parameters', 'reject-as-sets'])
self.cli_set(base_path + ['parameters', 'shutdown'])
+ self.cli_set(base_path + ['parameters', 'suppress-fib-pending'])
# AFI maximum path support
self.cli_set(base_path + ['address-family', 'ipv4-unicast', 'maximum-paths', 'ebgp', max_path_v4])
@@ -272,6 +273,7 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' bgp minimum-holdtime {min_hold_time}', frrconfig)
self.assertIn(f' bgp reject-as-sets', frrconfig)
self.assertIn(f' bgp shutdown', frrconfig)
+ self.assertIn(f' bgp suppress-fib-pending', frrconfig)
self.assertNotIn(f'bgp ebgp-requires-policy', frrconfig)
afiv4_config = self.getFRRconfig(' address-family ipv4 unicast')
@@ -786,4 +788,4 @@ class TestProtocolsBGP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' exit-address-family', afi_config)
if __name__ == '__main__':
- unittest.main(verbosity=2) \ No newline at end of file
+ unittest.main(verbosity=2)