diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2023-11-22 19:05:41 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2023-11-22 23:00:30 +0100 |
commit | 8b23c0b0bd3470babe8702f54a47bb223f471b14 (patch) | |
tree | 07e92fbef506de160930385036fd69901b59e6a6 /nhrpd | |
parent | Merge pull request #14830 from fdumontet6WIND/snmpv2 (diff) | |
download | frr-8b23c0b0bd3470babe8702f54a47bb223f471b14.tar.xz frr-8b23c0b0bd3470babe8702f54a47bb223f471b14.zip |
*: 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 <equinox@opensourcerouting.org>
Diffstat (limited to 'nhrpd')
-rw-r--r-- | nhrpd/nhrp_interface.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index 7c84fde36..b82743f00 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -259,13 +259,12 @@ static void nhrp_interface_update_address(struct interface *ifp, afi_t afi, struct nhrp_afi_data *if_ad = &nifp->afi[afi]; struct nhrp_cache *nc; struct connected *c, *best; - struct listnode *cnode; union sockunion addr; char buf[PREFIX_STRLEN]; /* Select new best match preferring primary address */ best = NULL; - for (ALL_LIST_ELEMENTS_RO(ifp->connected, cnode, c)) { + frr_each (if_connected, ifp->connected, c) { if (PREFIX_FAMILY(c->address) != family) continue; if (best == NULL) { |