Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgp: T6151: Allow configuration of disable-ebgp-connected-route-check #3212

Merged
merged 4 commits into from Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/templates/frr/bgpd.frr.j2
Expand Up @@ -537,6 +537,9 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
{% if parameters.allow_martian_nexthop is vyos_defined %}
bgp allow-martian-nexthop
{% endif %}
{% if parameters.disable_ebgp_connected_route_check is vyos_defined %}
bgp disable-ebgp-connected-route-check
{% endif %}
{% if parameters.always_compare_med is vyos_defined %}
bgp always-compare-med
{% endif %}
Expand Down
@@ -1,7 +1,7 @@
<!-- include start from bgp/neighbor-disable-connected-check.xml.i -->
<leafNode name="disable-connected-check">
<properties>
<help>Disable check to see if eBGP peer address is a connected route</help>
<help>Allow peerings between eBGP peer using loopback/dummy address</help>
<valueless/>
</properties>
</leafNode>
Expand Down
Expand Up @@ -1249,6 +1249,12 @@
<valueless/>
</properties>
</leafNode>
<leafNode name="disable-ebgp-connected-route-check">
<properties>
<help>Disable checking if nexthop is connected on eBGP session</help>
<valueless/>
</properties>
</leafNode>
<leafNode name="always-compare-med">
<properties>
<help>Always compare MEDs from different neighbors</help>
Expand Down
2 changes: 2 additions & 0 deletions smoketest/scripts/cli/test_protocols_bgp.py
Expand Up @@ -321,6 +321,7 @@ def test_bgp_01_simple(self):
tcp_keepalive_probes = '22'

self.cli_set(base_path + ['parameters', 'allow-martian-nexthop'])
self.cli_set(base_path + ['parameters', 'disable-ebgp-connected-route-check'])
self.cli_set(base_path + ['parameters', 'no-hard-administrative-reset'])
self.cli_set(base_path + ['parameters', 'log-neighbor-changes'])
self.cli_set(base_path + ['parameters', 'labeled-unicast', 'explicit-null'])
Expand Down Expand Up @@ -372,6 +373,7 @@ def test_bgp_01_simple(self):
self.assertIn(f'router bgp {ASN}', frrconfig)
self.assertIn(f' bgp router-id {router_id}', frrconfig)
self.assertIn(f' bgp allow-martian-nexthop', frrconfig)
self.assertIn(f' bgp disable-ebgp-connected-route-check', frrconfig)
self.assertIn(f' bgp log-neighbor-changes', frrconfig)
self.assertIn(f' bgp default local-preference {local_pref}', frrconfig)
self.assertIn(f' bgp conditional-advertisement timer {cond_adv_timer}', frrconfig)
Expand Down