diff options
| author | vivek <vivek@cumulusnetworks.com> | 2020-03-17 19:25:13 -0700 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2020-03-17 19:25:13 -0700 |
| commit | 8d27e1aaaca77121889ad06924b35f956d66de7c (patch) | |
| tree | 3811be864f96896e5b6a61032c38fa591fe83033 /zebra/rt_netlink.c | |
| parent | 09c04bc49098f513ceaba6323f5c2921212b8e03 (diff) | |
zebra: Install nexthop's weight for IPv4 routes with IPv6 next hops
Ensure that any weight associated with the next hop is installed for
IPv4 routes with IPv6 next hops too.
Updates: lib, zebra: Allow for installation of a weighted nexthop
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index e40bf45f59..2cc520bbce 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1340,6 +1340,8 @@ static void _netlink_route_build_multipath(const char *routedesc, int bytelen, bytelen); rtnh->rtnh_len += sizeof(struct rtattr) + bytelen; rtnh->rtnh_ifindex = nexthop->ifindex; + if (nexthop->weight) + rtnh->rtnh_hops = nexthop->weight - 1; if (nexthop->rmap_src.ipv4.s_addr != INADDR_ANY) *src = &nexthop->rmap_src; |
