mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 09:47:11 +00:00
Merge pull request #6974 from liron-ze/high-cpu-usage
zebra: Solve the problem of high CPU and memory usage when creating t…
This commit is contained in:
commit
2525fc315a
@ -1349,6 +1349,20 @@ static void zread_interface_add(ZAPI_HANDLER_ARGS)
|
||||
struct vrf *vrf;
|
||||
struct interface *ifp;
|
||||
|
||||
vrf_id_t vrf_id = zvrf_id(zvrf);
|
||||
if (vrf_id != VRF_DEFAULT && vrf_id != VRF_UNKNOWN) {
|
||||
FOR_ALL_INTERFACES (zvrf->vrf, ifp) {
|
||||
/* Skip pseudo interface. */
|
||||
if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE))
|
||||
continue;
|
||||
|
||||
zsend_interface_add(client, ifp);
|
||||
zsend_interface_link_params(client, ifp);
|
||||
zsend_interface_addresses(client, ifp);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) {
|
||||
FOR_ALL_INTERFACES (vrf, ifp) {
|
||||
/* Skip pseudo interface. */
|
||||
|
Loading…
Reference in New Issue
Block a user