From 8b23c0b0bd3470babe8702f54a47bb223f471b14 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 22 Nov 2023 19:05:41 +0100 Subject: *: convert `struct interface->connected` to DLIST Replace `struct list *` with `DLIST(if_connected, ...)`. NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking: - vrrpd/vrrp.c: vrrp_socket() - zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off() (these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling) Signed-off-by: David Lamparter --- eigrpd/eigrp_network.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'eigrpd') diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index ef567fe4ef..5ca5a18a97 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -233,13 +233,11 @@ static void eigrp_network_run_interface(struct eigrp *eigrp, struct prefix *p, struct interface *ifp) { struct eigrp_interface *ei; - struct listnode *cnode; struct connected *co; /* if interface prefix is match specified prefix, then create socket and join multicast group. */ - for (ALL_LIST_ELEMENTS_RO(ifp->connected, cnode, co)) { - + frr_each (if_connected, ifp->connected, co) { if (CHECK_FLAG(co->flags, ZEBRA_IFA_SECONDARY)) continue; -- cgit v1.2.3