Skip to content

Commit

Permalink
Update bgpd.main.conf.j2
Browse files Browse the repository at this point in the history
bgpd.main.conf.j2: bugfix-9739
* Update bgpd.main.conf.j2 to gracefully handle the bgp configuration cases for when 'bgp_asn' is set to 'None', 'Null', or missing.

Signed-off-by: cchoate54@gmail.com
  • Loading branch information
cchoate54 authored Nov 2, 2022
1 parent b3a8167 commit e90c9cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ route-map HIDE_INTERNAL permit 20
!
{% endif %}
!
{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('bgp_asn' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['bgp_asn'].lower() != 'none') and (DEVICE_METADATA['localhost']['bgp_asn'].lower() != 'null') %}
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
!
{% block bgp_init %}
Expand Down Expand Up @@ -143,6 +144,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
exit-address-family
{% endblock maximum_paths %}
{% endif %}
{% endif %}
!
! end of template: bgpd/bgpd.main.conf.j2
!

0 comments on commit e90c9cf

Please sign in to comment.