summaryrefslogtreecommitdiff
path: root/ripngd/ripng_interface.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-11-23 17:45:07 -0500
committerGitHub <noreply@github.com>2023-11-23 17:45:07 -0500
commit25f1b66fde6bee4051d57bf54202f83388ae4b57 (patch)
treebe471f8e0ab35f0e6cc86a7d43810745daeb9865 /ripngd/ripng_interface.c
parent27be058232ad530e2446cb8a12de0a7d04d0a758 (diff)
parent6e7465c54e6be65ec88f88b4493fd073698cb39d (diff)
Merge pull request #14863 from opensourcerouting/if-connected-dlist
*: convert struct interface->connected to DLIST
Diffstat (limited to 'ripngd/ripng_interface.c')
-rw-r--r--ripngd/ripng_interface.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index aa470aa652..35d92632a0 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -128,11 +128,10 @@ static int ripng_multicast_leave(struct interface *ifp, int sock)
/* How many link local IPv6 address could be used on the interface ? */
static int ripng_if_ipv6_lladdress_check(struct interface *ifp)
{
- struct listnode *nn;
struct connected *connected;
int count = 0;
- for (ALL_LIST_ELEMENTS_RO(ifp->connected, nn, connected)) {
+ frr_each (if_connected, ifp->connected, connected) {
struct prefix *p;
p = connected->address;
@@ -408,14 +407,13 @@ static int ripng_enable_network_lookup_if(struct interface *ifp)
{
struct ripng_interface *ri = ifp->info;
struct ripng *ripng = ri->ripng;
- struct listnode *node;
struct connected *connected;
struct prefix_ipv6 address;
if (!ripng)
return -1;
- for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
+ frr_each (if_connected, ifp->connected, connected) {
struct prefix *p;
struct agg_node *n;
@@ -590,11 +588,10 @@ static void ripng_connect_set(struct interface *ifp, int set)
{
struct ripng_interface *ri = ifp->info;
struct ripng *ripng = ri->ripng;
- struct listnode *node, *nnode;
struct connected *connected;
struct prefix_ipv6 address;
- for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, connected)) {
+ frr_each (if_connected, ifp->connected, connected) {
struct prefix *p;
p = connected->address;