From e44a40cc3b214b904f77ab4652a4b258f7f3b504 Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Tue, 8 Feb 2022 09:36:32 -0800 Subject: [PATCH] Updated Internal BGP Templates for chassis packet (#9674) Fixes: https://github.com/Azure/sonic-buildimage/issues/9610 --- .../frr/bgpd/templates/internal/peer-group.conf.j2 | 6 ++---- .../internal/peer-group.conf/result_chasiss_packet.conf | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/internal/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/internal/peer-group.conf.j2 index 0b15136c55..e14094a652 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/internal/peer-group.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/internal/peer-group.conf.j2 @@ -1,14 +1,12 @@ ! ! template: bgpd/templates/internal/peer-group.conf.j2 -{% from "common/functions.conf.j2" import get_ipv4_loopback_address %} -{% from "common/functions.conf.j2" import get_ipv6_loopback_address %} ! neighbor INTERNAL_PEER_V4 peer-group neighbor INTERNAL_PEER_V6 peer-group address-family ipv4 {% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %} - neighbor INTERNAL_PEER_V4 update-source {{ get_ipv4_loopback_address(CONFIG_DB__LOOPBACK_INTERFACE, "Loopback4096") | ip }} + neighbor INTERNAL_PEER_V4 update-source Loopback4096 {% elif CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} neighbor INTERNAL_PEER_V4 route-reflector-client {% endif %} @@ -19,7 +17,7 @@ exit-address-family address-family ipv6 {% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %} - neighbor INTERNAL_PEER_V6 update-source {{ get_ipv6_loopback_address(CONFIG_DB__LOOPBACK_INTERFACE, "Loopback4096") | ip }} + neighbor INTERNAL_PEER_V6 update-source Loopback4096 {% elif CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} neighbor INTERNAL_PEER_V6 route-reflector-client {% endif %} diff --git a/src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/result_chasiss_packet.conf b/src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/result_chasiss_packet.conf index c36359de77..3a6f0bad59 100644 --- a/src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/result_chasiss_packet.conf +++ b/src/sonic-bgpcfgd/tests/data/internal/peer-group.conf/result_chasiss_packet.conf @@ -4,14 +4,14 @@ neighbor INTERNAL_PEER_V4 peer-group neighbor INTERNAL_PEER_V6 peer-group address-family ipv4 - neighbor INTERNAL_PEER_V4 update-source 10.10.10.10 + neighbor INTERNAL_PEER_V4 update-source Loopback4096 neighbor INTERNAL_PEER_V4 soft-reconfiguration inbound neighbor INTERNAL_PEER_V4 allowas-in 1 neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out exit-address-family address-family ipv6 - neighbor INTERNAL_PEER_V6 update-source 2603:10e2:400::3 + neighbor INTERNAL_PEER_V6 update-source Loopback4096 neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound neighbor INTERNAL_PEER_V6 allowas-in 1 neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in