mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 18:04:03 +00:00
Merge pull request #6021 from vivek-cumulus/weighted_routes_rfc5549_fix
zebra: Install nexthop's weight for IPv4 routes with IPv6 next hops
This commit is contained in:
commit
2dd3ba7da1
@ -1340,6 +1340,8 @@ static void _netlink_route_build_multipath(const char *routedesc, int bytelen,
|
|||||||
bytelen);
|
bytelen);
|
||||||
rtnh->rtnh_len += sizeof(struct rtattr) + bytelen;
|
rtnh->rtnh_len += sizeof(struct rtattr) + bytelen;
|
||||||
rtnh->rtnh_ifindex = nexthop->ifindex;
|
rtnh->rtnh_ifindex = nexthop->ifindex;
|
||||||
|
if (nexthop->weight)
|
||||||
|
rtnh->rtnh_hops = nexthop->weight - 1;
|
||||||
|
|
||||||
if (nexthop->rmap_src.ipv4.s_addr != INADDR_ANY)
|
if (nexthop->rmap_src.ipv4.s_addr != INADDR_ANY)
|
||||||
*src = &nexthop->rmap_src;
|
*src = &nexthop->rmap_src;
|
||||||
|
Loading…
Reference in New Issue
Block a user