Skip to content

Commit 1ff77a8

Browse files
berendtosfrickler
authored andcommitted
frr: add optional BGP neighbor password support
Add conditional password configuration for BGP neighbors in FRR templates. This allows setting passwords on BGP sessions when the password parameter is provided in the neighbor configuration. Signed-off-by: Christian Berendt <[email protected]>
1 parent 9ee43e9 commit 1ff77a8

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

roles/frr/templates/frr_k3s_cilium.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ router bgp {{ frr_local_as }}
1010
bgp router-id {{ frr_loopback_v4 }}
1111
{% for item in _frr_uplinks %}
1212
neighbor {{ item.address }} remote-as {{ item.remote_as }}
13+
{% if "password" in item %}
14+
neighbor {{ item.address }} password {{ item.password }}
15+
{% endif %}
1316
neighbor {{ item.address }} update-source {{ item.interface }}
1417
neighbor {{ item.address }} soft-reconfiguration inbound
1518
{% endfor %}

roles/frr/templates/frr_leaf.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ router bgp {{ frr_local_as }}
1010
bgp router-id {{ frr_loopback_v4 }}
1111
{% for item in _frr_uplinks %}
1212
neighbor {{ item.interface }} interface remote-as {{ item.remote_as }}
13+
{% if "password" in item %}
14+
neighbor {{ item.interface }} password {{ item.password }}
15+
{% endif %}
1316
{% endfor %}
1417
!
1518
address-family ipv4 unicast

roles/frr/templates/frr_loadbalancer.conf.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ router bgp {{ frr_local_as }}
1010
bgp bestpath as-path multipath-relax
1111
{% for item in frr_neigh_v4 %}
1212
neighbor {{ item.address }} remote-as {{ item.remote_as }}
13+
{% if "password" in item %}
14+
neighbor {{ item.address }} password {{ item.password }}
15+
{% endif %}
1316
{% endfor %}
1417
{% for item in frr_neigh_v6 %}
1518
neighbor {{ item.address }} remote-as {{ item.remote_as }}
19+
{% if "password" in item %}
20+
neighbor {{ item.address }} password {{ item.password }}
21+
{% endif %}
1622
{% endfor %}
1723
!
1824
address-family ipv4 unicast

roles/frr/templates/frr_loadbalancer_external_uplink.conf.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ router bgp {{ frr_local_as }}
1010
bgp router-id {{ frr_loopback_v4 }}
1111
{% for item in _frr_uplinks + frr_uplinks_external %}
1212
neighbor {{ item.interface }} interface remote-as {{ item.remote_as }}
13+
{% if "password" in item %}
14+
neighbor {{ item.interface }} password {{ item.password }}
15+
{% endif %}
1316
{% endfor %}
1417
!
1518
address-family ipv4 unicast

0 commit comments

Comments
 (0)