summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheeze_It <none@none.com>2021-02-25 17:30:03 -0700
committerCheeze_It <none@none.com>2021-02-26 13:51:10 -0700
commit4bf55f9732dd44d2297d70c0587604df90a39757 (patch)
tree90bd23eaea14d8694a533371e4c45ec0ec9c68ff
parent3c64c79d7977869da3ca4dc70eb97ff9c6682e52 (diff)
downloadvyos-1x-4bf55f9732dd44d2297d70c0587604df90a39757.tar.gz
vyos-1x-4bf55f9732dd44d2297d70c0587604df90a39757.zip
BGP: T2100: Adding RFC8212 option toggle.
In this commit we add the default operation within BGP to have RFC8212 disabled for eBGP routes. This default should preserve the normal behavior for VyOS from earlier releases of FRR to the current latest release. Another option that we add is the ability to toggle whether or not RFC8212 is enabled or disabled.
-rw-r--r--data/templates/frr/bgp.frr.tmpl6
-rw-r--r--interface-definitions/protocols-bgp.xml.in6
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_bgp.py4
3 files changed, 13 insertions, 3 deletions
diff --git a/data/templates/frr/bgp.frr.tmpl b/data/templates/frr/bgp.frr.tmpl
index 08b6cb791..4ac025eee 100644
--- a/data/templates/frr/bgp.frr.tmpl
+++ b/data/templates/frr/bgp.frr.tmpl
@@ -178,9 +178,11 @@
{% endmacro %}
!
router bgp {{ asn }}
-{# Disable eBGP policy by default until there is a CLI option #}
-{# Workaround for T3183 until we have decided about a migration script #}
+{% if parameters is defined and parameters.ebgp_requires_policy is defined %}
+ bgp ebgp-requires-policy
+{% else %}
no bgp ebgp-requires-policy
+{% endif %}
{# Workaround for T2100 until we have decided about a migration script #}
no bgp network import-check
{% if address_family is defined and address_family is not none %}
diff --git a/interface-definitions/protocols-bgp.xml.in b/interface-definitions/protocols-bgp.xml.in
index 4af53acdc..3f3b2661d 100644
--- a/interface-definitions/protocols-bgp.xml.in
+++ b/interface-definitions/protocols-bgp.xml.in
@@ -805,6 +805,12 @@
</tagNode>
</children>
</node>
+ <leafNode name="ebgp-requires-policy">
+ <properties>
+ <help>Enable RFC8212 functionality</help>
+ <valueless/>
+ </properties>
+ </leafNode>
<node name="graceful-restart">
<properties>
<help>Graceful restart capability parameters</help>
diff --git a/smoketest/scripts/cli/test_protocols_bgp.py b/smoketest/scripts/cli/test_protocols_bgp.py
index 1de51a1fc..f8c1f6a57 100755
--- a/smoketest/scripts/cli/test_protocols_bgp.py
+++ b/smoketest/scripts/cli/test_protocols_bgp.py
@@ -221,12 +221,13 @@ class TestProtocolsBGP(unittest.TestCase):
self.session.set(base_path + ['parameters', 'router-id', router_id])
self.session.set(base_path + ['parameters', 'log-neighbor-changes'])
- # Default local preference (higher=more preferred)
+ # Default local preference (higher = more preferred, default value is 100)
self.session.set(base_path + ['parameters', 'default', 'local-pref', local_pref])
# Deactivate IPv4 unicast for a peer by default
self.session.set(base_path + ['parameters', 'default', 'no-ipv4-unicast'])
self.session.set(base_path + ['parameters', 'graceful-restart', 'stalepath-time', stalepath_time])
self.session.set(base_path + ['parameters', 'graceful-shutdown'])
+ self.session.set(base_path + ['parameters', 'ebgp-requires-policy'])
# commit changes
self.session.commit()
@@ -240,6 +241,7 @@ class TestProtocolsBGP(unittest.TestCase):
self.assertIn(f' no bgp default ipv4-unicast', frrconfig)
self.assertIn(f' bgp graceful-restart stalepath-time {stalepath_time}', frrconfig)
self.assertIn(f' bgp graceful-shutdown', frrconfig)
+ self.assertIn(f' bgp ebgp-requires-policy', frrconfig)
def test_bgp_02_neighbors(self):