Skip to content

Commit

Permalink
[fpmsyncd] don't manipulate route weight (sonic-net#2320)
Browse files Browse the repository at this point in the history
Return the next hop weight obtained from kernel as-is.

Sample next hop weight:

admin@svcstr-7050-acs-4:~$ ip route show 193.11.248.128/25
193.11.248.128/25 nhid 1452 proto bgp src 10.1.0.33 metric 20
nexthop via 10.0.1.61 dev PortChannel103 weight 1
nexthop via 10.0.1.63 dev PortChannel104 weight 1
nexthop via 10.0.1.59 dev PortChannel102 weight 1
nexthop via 10.0.1.57 dev PortChannel101 weight 1

Signed-off-by: Ying Xie <[email protected]>
  • Loading branch information
yxieca authored Jun 10, 2022
1 parent a3f4fbb commit b12af41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fpmsyncd/routesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ string RouteSync::getNextHopWt(struct rtnl_route *route_obj)
uint8_t weight = rtnl_route_nh_get_weight(nexthop);
if (weight)
{
result += to_string(weight + 1);
result += to_string(weight);
}
else
{
Expand Down

0 comments on commit b12af41

Please sign in to comment.