Skip to content

Commit

Permalink
WCMP support for MPLS (sonic-net#1895)
Browse files Browse the repository at this point in the history
*When WCMP PR was restored to SONiC master, updates to mplsrouteorch.cpp were missing.
  • Loading branch information
qbdwlr authored Sep 8, 2021
1 parent 447ac71 commit 254bc12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion orchagent/mplsrouteorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ void RouteOrch::doLabelTask(Consumer& consumer)
string aliases;
string mpls_nhs;
uint8_t& pop_count = ctx.pop_count;
string weights;
bool& excp_intfs_flag = ctx.excp_intfs_flag;
bool blackhole = false;

Expand All @@ -144,6 +145,9 @@ void RouteOrch::doLabelTask(Consumer& consumer)

if (fvField(i) == "blackhole")
blackhole = fvValue(i) == "true";

if (fvField(i) == "weight")
weights = fvValue(i);
}
vector<string> ipv = tokenize(ips, ',');
vector<string> alsv = tokenize(aliases, ',');
Expand Down Expand Up @@ -220,7 +224,7 @@ void RouteOrch::doLabelTask(Consumer& consumer)
nhg_str += ipv[i] + NH_DELIMITER + alsv[i];
}

nhg = NextHopGroupKey(nhg_str);
nhg = NextHopGroupKey(nhg_str, weights);
}

if (nhg.getSize() == 1 && nhg.hasIntfNextHop())
Expand Down

0 comments on commit 254bc12

Please sign in to comment.