Skip to content

Commit

Permalink
Merge "Ecmp path should publish community" into R3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 25, 2016
2 parents e25497a + a3130c6 commit 6acefac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/vnsw/agent/controller/controller_route_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down
15 changes: 13 additions & 2 deletions src/vnsw/agent/oper/inet_unicast_route.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/vnsw/agent/oper/inet_unicast_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6acefac

Please sign in to comment.