]> git.proxmox.com Git - mirror_frr.git/blobdiff - ldpd/ldp_zebra.c
*: use rb-trees to store interfaces instead of sorted linked-lists
[mirror_frr.git] / ldpd / ldp_zebra.c
index c50cc0fda2e2227306f0598bd33ef3ad37e0e43a..2dda5f57bf608770b015bce2c49dc327c97e5443 100644 (file)
@@ -212,13 +212,14 @@ kmpw_unset(struct zapi_pw *zpw)
 void
 kif_redistribute(const char *ifname)
 {
-       struct listnode         *node, *cnode;
+       struct vrf              *vrf = vrf_lookup_by_id(VRF_DEFAULT);
+       struct listnode         *cnode;
        struct interface        *ifp;
        struct connected        *ifc;
        struct kif               kif;
        struct kaddr             ka;
 
-       for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) {
+       RB_FOREACH (ifp, if_name_head, &vrf->ifaces_by_name) {
                if (ifname && strcmp(ifname, ifp->name) != 0)
                        continue;