diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-10-16 12:00:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-16 12:00:38 -0400 |
| commit | 5b8d8894f8ecb401acc9b3986bbb6ce95b3263e9 (patch) | |
| tree | 077628692cdbae750e26d1b8f237c422bae6519d /ldpd/ldp_zebra.c | |
| parent | 4c6ed05e4e2276c463f16c1dbf8d9f04bc1130fe (diff) | |
| parent | 451fda4f9a2fadc24328e640077780a00ffcdac2 (diff) | |
Merge pull request #1298 from opensourcerouting/iface-rb-tree
Use rb-trees to store interfaces instead of linked-lists
Diffstat (limited to 'ldpd/ldp_zebra.c')
| -rw-r--r-- | ldpd/ldp_zebra.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c index c50cc0fda2..7f68f0b694 100644 --- a/ldpd/ldp_zebra.c +++ b/ldpd/ldp_zebra.c @@ -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)) { + FOR_ALL_INTERFACES (vrf, ifp) { if (ifname && strcmp(ifname, ifp->name) != 0) continue; @@ -287,7 +288,7 @@ ldp_interface_delete(int command, struct zclient *zclient, zebra_size_t length, /* To support pseudo interface do not free interface structure. */ /* if_delete(ifp); */ - ifp->ifindex = IFINDEX_DELETED; + if_set_index(ifp, IFINDEX_INTERNAL); ifp2kif(ifp, &kif); main_imsg_compose_both(IMSG_IFSTATUS, &kif, sizeof(kif)); |
