summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-12-11 11:02:15 -0500
committerGitHub <noreply@github.com>2019-12-11 11:02:15 -0500
commitc81c2303e631a8ccd80229621265baef716ea778 (patch)
tree16da85304572827fefadd14b32b6acbf466923df /zebra/zapi_msg.c
parent9880c0f3ae2706de0bc07c10133b0c37b14feea5 (diff)
parent597371a615b9f062642dfd97b4d81c05e7a9bd55 (diff)
Merge pull request #5497 from donaldsharp/unequality_ecmp
Unequality ecmp
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index e1654a1a3c..1dbe41f462 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -567,6 +567,7 @@ int zsend_redistribute_route(int cmd, struct zserv *client,
api_nh = &api.nexthops[count];
api_nh->vrf_id = nexthop->vrf_id;
api_nh->type = nexthop->type;
+ api_nh->weight = nexthop->weight;
switch (nexthop->type) {
case NEXTHOP_TYPE_BLACKHOLE:
api_nh->bh_type = nexthop->bh_type;
@@ -1544,6 +1545,9 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_ONLINK))
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK);
+ if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_WEIGHT))
+ nexthop->weight = api_nh->weight;
+
/* MPLS labels for BGP-LU or Segment Routing */
if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_LABEL)
&& api_nh->type != NEXTHOP_TYPE_IFINDEX