diff --git a/src/vnsw/agent/controller/controller_route_path.cc b/src/vnsw/agent/controller/controller_route_path.cc index c253eda6922..a70fdfb52ad 100644 --- a/src/vnsw/agent/controller/controller_route_path.cc +++ b/src/vnsw/agent/controller/controller_route_path.cc @@ -72,6 +72,7 @@ bool ControllerEcmpRoute::AddChangePath(Agent *agent, AgentPath *path, return InetUnicastRouteEntry::ModifyEcmpPath(dest_addr_, plen_, vn_list_, label_, local_ecmp_nh_, vrf_name_, sg_list_, + CommunityList(), path_preference_, tunnel_bmap_, ecmp_load_balance_, diff --git a/src/vnsw/agent/oper/inet_unicast_route.cc b/src/vnsw/agent/oper/inet_unicast_route.cc index 7be5d67439f..2dc89385007 100644 --- a/src/vnsw/agent/oper/inet_unicast_route.cc +++ b/src/vnsw/agent/oper/inet_unicast_route.cc @@ -334,6 +334,7 @@ bool InetUnicastRouteEntry::ModifyEcmpPath(const IpAddress &dest_addr, uint32_t label, bool local_ecmp_nh, const string &vrf_name, SecurityGroupList sg_list, + const CommunityList &communities, const PathPreference &path_preference, TunnelType::TypeBmap tunnel_bmap, const EcmpLoadBalance &ecmp_load_balance, @@ -366,6 +367,13 @@ bool InetUnicastRouteEntry::ModifyEcmpPath(const IpAddress &dest_addr, ret = true; } + CommunityList path_communities; + path_communities = path->communities(); + if (path_communities != communities) { + path->set_communities(communities); + ret = true; + } + if (path_preference != path->path_preference()) { path->set_path_preference(path_preference); ret = true; @@ -428,6 +436,7 @@ AgentPath *InetUnicastRouteEntry::AllocateEcmpPath(Agent *agent, InetUnicastRouteEntry::ModifyEcmpPath(addr_, plen_, path2->dest_vn_list(), label, true, vrf()->GetName(), path2->sg_list(), + path2->communities(), path2->path_preference(), path2->tunnel_bmap(), path2->ecmp_load_balance(), @@ -651,7 +660,8 @@ void InetUnicastRouteEntry::AppendEcmpPath(Agent *agent, InetUnicastRouteEntry::ModifyEcmpPath(addr_, plen_, path->dest_vn_list(), ecmp_path->label(), true, vrf()->GetName(), - path->sg_list(), path->path_preference(), + path->sg_list(), path->communities(), + path->path_preference(), path->tunnel_bmap(), path->ecmp_load_balance(), nh_req, agent, ecmp_path); @@ -694,7 +704,8 @@ void InetUnicastRouteEntry::DeleteComponentNH(Agent *agent, AgentPath *path) { InetUnicastRouteEntry::ModifyEcmpPath(addr_, plen_, ecmp_path->dest_vn_list(), ecmp_path->label(), true, vrf()->GetName(), - ecmp_path->sg_list(), ecmp_path->path_preference(), + ecmp_path->sg_list(), ecmp_path->communities(), + ecmp_path->path_preference(), ecmp_path->tunnel_bmap(), ecmp_path->ecmp_load_balance(), nh_req, agent, ecmp_path); diff --git a/src/vnsw/agent/oper/inet_unicast_route.h b/src/vnsw/agent/oper/inet_unicast_route.h index bbfc3b9f18b..06af1c24003 100644 --- a/src/vnsw/agent/oper/inet_unicast_route.h +++ b/src/vnsw/agent/oper/inet_unicast_route.h @@ -81,6 +81,7 @@ class InetUnicastRouteEntry : public AgentRoute { uint32_t label, bool local_ecmp_nh, const string &vrf_name, SecurityGroupList sg_list, + const CommunityList &communities, const PathPreference &path_preference, TunnelType::TypeBmap tunnel_bmap, const EcmpLoadBalance &ecmp_ecmp_load_balance,