diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2023-11-23 17:45:07 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-23 17:45:07 -0500 |
| commit | 25f1b66fde6bee4051d57bf54202f83388ae4b57 (patch) | |
| tree | be471f8e0ab35f0e6cc86a7d43810745daeb9865 /ldpd/ldp_zebra.c | |
| parent | 27be058232ad530e2446cb8a12de0a7d04d0a758 (diff) | |
| parent | 6e7465c54e6be65ec88f88b4493fd073698cb39d (diff) | |
Merge pull request #14863 from opensourcerouting/if-connected-dlist
*: convert struct interface->connected to DLIST
Diffstat (limited to 'ldpd/ldp_zebra.c')
| -rw-r--r-- | ldpd/ldp_zebra.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c index a9814f18f8..df682a1347 100644 --- a/ldpd/ldp_zebra.c +++ b/ldpd/ldp_zebra.c @@ -330,7 +330,6 @@ void kif_redistribute(const char *ifname) { struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); - struct listnode *cnode; struct interface *ifp; struct connected *ifc; struct kif kif; @@ -343,7 +342,7 @@ kif_redistribute(const char *ifname) ifp2kif(ifp, &kif); main_imsg_compose_both(IMSG_IFSTATUS, &kif, sizeof(kif)); - for (ALL_LIST_ELEMENTS_RO(ifp->connected, cnode, ifc)) { + frr_each (if_connected, ifp->connected, ifc) { ifc2kaddr(ifp, ifc, &ka); main_imsg_compose_ldpe(IMSG_NEWADDR, 0, &ka, sizeof(ka)); } @@ -400,7 +399,6 @@ ldp_ifp_destroy(struct interface *ifp) static int ldp_interface_status_change(struct interface *ifp) { - struct listnode *node; struct connected *ifc; struct kif kif; struct kaddr ka; @@ -411,12 +409,12 @@ ldp_interface_status_change(struct interface *ifp) main_imsg_compose_both(IMSG_IFSTATUS, &kif, sizeof(kif)); if (if_is_operative(ifp)) { - for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) { + frr_each (if_connected, ifp->connected, ifc) { ifc2kaddr(ifp, ifc, &ka); main_imsg_compose_ldpe(IMSG_NEWADDR, 0, &ka, sizeof(ka)); } } else { - for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) { + frr_each (if_connected, ifp->connected, ifc) { ifc2kaddr(ifp, ifc, &ka); main_imsg_compose_ldpe(IMSG_DELADDR, 0, &ka, sizeof(ka)); } |
