diff --git a/dockers/docker-fpm-quagga/zebra.conf.j2 b/dockers/docker-fpm-quagga/zebra.conf.j2 index e4586e72dd..4acb474b0e 100644 --- a/dockers/docker-fpm-quagga/zebra.conf.j2 +++ b/dockers/docker-fpm-quagga/zebra.conf.j2 @@ -52,9 +52,11 @@ ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200 {% endfor %} {% endif %} ! Set ip source to loopback for bgp learned routes +{% if lo_ipv4_addrs|length > 0 -%} route-map RM_SET_SRC permit 10 set src {{ lo_ipv4_addrs[0] | ip }} ! +{% endif %} {% if lo_ipv6_addrs|length > 0 %} route-map RM_SET_SRC6 permit 10 set src {{ lo_ipv6_addrs[0] | ip }}