mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 10:38:05 +00:00
Merge pull request #2704 from sworleys/Netlink-Nexthop-Hang
zebra: Add check for nexthop loop to prevent hanging
This commit is contained in:
commit
4dbd617abd
@ -580,6 +580,9 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
|
|||||||
route_entry_nexthop_ifindex_add(
|
route_entry_nexthop_ifindex_add(
|
||||||
re, index, nh_vrf_id);
|
re, index, nh_vrf_id);
|
||||||
|
|
||||||
|
if (rtnh->rtnh_len == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
len -= NLMSG_ALIGN(rtnh->rtnh_len);
|
len -= NLMSG_ALIGN(rtnh->rtnh_len);
|
||||||
rtnh = RTNH_NEXT(rtnh);
|
rtnh = RTNH_NEXT(rtnh);
|
||||||
}
|
}
|
||||||
@ -700,6 +703,9 @@ static int netlink_route_change_read_multicast(struct nlmsghdr *h,
|
|||||||
oif[oif_count] = rtnh->rtnh_ifindex;
|
oif[oif_count] = rtnh->rtnh_ifindex;
|
||||||
oif_count++;
|
oif_count++;
|
||||||
|
|
||||||
|
if (rtnh->rtnh_len == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
len -= NLMSG_ALIGN(rtnh->rtnh_len);
|
len -= NLMSG_ALIGN(rtnh->rtnh_len);
|
||||||
rtnh = RTNH_NEXT(rtnh);
|
rtnh = RTNH_NEXT(rtnh);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user