Skip to content

Commit

Permalink
Merge "If VRF is deleted, do not assert for NULL NH while modifying e…
Browse files Browse the repository at this point in the history
…cmp path."
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 2, 2016
2 parents b36469b + a6e8bbe commit df48b6e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/vnsw/agent/oper/inet_unicast_route.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,12 @@ bool InetUnicastRouteEntry::ModifyEcmpPath(const IpAddress &dest_addr,
agent->nexthop_table()->Process(nh_req);
nh = static_cast<NextHop *>(agent->nexthop_table()->
FindActiveEntry(nh_req.key.get()));
assert(nh);
if (nh == NULL) {
VrfEntry *vrf = agent->vrf_table()->FindVrfFromName(vrf_name);
if (vrf->IsDeleted())
return ret;
assert(0);
}
if (path->label() != label) {
path->set_label(label);
ret = true;
Expand Down Expand Up @@ -728,14 +733,16 @@ void InetUnicastRouteEntry::DeleteComponentNH(Agent *agent, AgentPath *path) {
vrf()->GetName()));
nh_req.data.reset(new CompositeNHData());

InetUnicastRouteEntry::ModifyEcmpPath(addr_, plen_,
if (!InetUnicastRouteEntry::ModifyEcmpPath(addr_, plen_,
ecmp_path->dest_vn_list(),
ecmp_path->label(), true, vrf()->GetName(),
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);
nh_req, agent, ecmp_path)) {
return;
}

//Make MPLS label point to composite NH
MplsLabel::CreateEcmpLabel(agent, ecmp_path->label(), Composite::LOCAL_ECMP,
Expand Down

0 comments on commit df48b6e

Please sign in to comment.