Skip to content

Commit 7af5469

Browse files
[bgp]: Fix isolate/unisolate command for ipv6 peers (#3183)
* Fix isolate/unisolate command for ipv6 peers
1 parent 6e37e23 commit 7af5469

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

dockers/docker-fpm-frr/isolate.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ exit $?
1010
configure terminal
1111
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
1212
{% for neighbor_addr in BGP_NEIGHBOR %}
13+
{% if neighbor_addr | ipv4 %}
1314
neighbor {{ neighbor_addr }} route-map ISOLATE out
15+
{% else %}
16+
address-family ipv6
17+
neighbor {{ neighbor_addr }} route-map ISOLATE out
18+
exit-address-family
19+
{% endif %}
1420
{% endfor %}
1521
exit
1622
exit

dockers/docker-fpm-frr/unisolate.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ exit $?
1010
configure terminal
1111
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
1212
{% for neighbor_ip in BGP_NEIGHBOR %}
13+
{% if neighbor_ip | ipv4 %}
1314
no neighbor {{ neighbor_ip }} route-map ISOLATE out
15+
{% else %}
16+
address-family ipv6
17+
no neighbor {{ neighbor_ip }} route-map ISOLATE out
18+
exit-address-family
19+
{% endif %}
1420
{% endfor %}
1521
exit
1622
exit

dockers/docker-fpm-quagga/isolate.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ exit $?
1010
configure terminal
1111
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
1212
{% for neighbor_addr in BGP_NEIGHBOR %}
13+
{% if neighbor_addr | ipv4 %}
1314
neighbor {{ neighbor_addr }} route-map ISOLATE out
15+
{% else %}
16+
address-family ipv6
17+
neighbor {{ neighbor_addr }} route-map ISOLATE out
18+
exit-address-family
19+
{% endif %}
1420
{% endfor %}
1521
exit
1622
exit

dockers/docker-fpm-quagga/unisolate.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ exit $?
1010
configure terminal
1111
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
1212
{% for neighbor_ip in BGP_NEIGHBOR %}
13+
{% if neighbor_ip | ipv4 %}
1314
no neighbor {{ neighbor_ip }} route-map ISOLATE out
15+
{% else %}
16+
address-family ipv6
17+
no neighbor {{ neighbor_ip }} route-map ISOLATE out
18+
exit-address-family
19+
{% endif %}
1420
{% endfor %}
1521
exit
1622
exit

0 commit comments

Comments
 (0)