Skip to content

Commit 254bc12

Browse files
authored
WCMP support for MPLS (#1895)
*When WCMP PR was restored to SONiC master, updates to mplsrouteorch.cpp were missing.
1 parent 447ac71 commit 254bc12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

orchagent/mplsrouteorch.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ void RouteOrch::doLabelTask(Consumer& consumer)
125125
string aliases;
126126
string mpls_nhs;
127127
uint8_t& pop_count = ctx.pop_count;
128+
string weights;
128129
bool& excp_intfs_flag = ctx.excp_intfs_flag;
129130
bool blackhole = false;
130131

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

145146
if (fvField(i) == "blackhole")
146147
blackhole = fvValue(i) == "true";
148+
149+
if (fvField(i) == "weight")
150+
weights = fvValue(i);
147151
}
148152
vector<string> ipv = tokenize(ips, ',');
149153
vector<string> alsv = tokenize(aliases, ',');
@@ -220,7 +224,7 @@ void RouteOrch::doLabelTask(Consumer& consumer)
220224
nhg_str += ipv[i] + NH_DELIMITER + alsv[i];
221225
}
222226

223-
nhg = NextHopGroupKey(nhg_str);
227+
nhg = NextHopGroupKey(nhg_str, weights);
224228
}
225229

226230
if (nhg.getSize() == 1 && nhg.hasIntfNextHop())

0 commit comments

Comments
 (0)