summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_snmp.c')
-rw-r--r--ospfd/ospf_snmp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index c9aaa9f..fc0c143 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -1348,7 +1348,7 @@ static int ospf_snmp_if_update(struct interface *ifp)
ifindex = 0;
/* Lookup first IPv4 address entry. */
- for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) {
+ frr_each (if_connected, ifp->connected, ifc) {
p = CONNECTED_ID(ifc);
if (p->family == AF_INET) {
@@ -1396,11 +1396,10 @@ static int ospf_snmp_if_update(struct interface *ifp)
static int ospf_snmp_is_if_have_addr(struct interface *ifp)
{
- struct listnode *nn;
struct connected *ifc;
/* Is this interface having any connected IPv4 address ? */
- for (ALL_LIST_ELEMENTS_RO(ifp->connected, nn, ifc)) {
+ frr_each (if_connected, ifp->connected, ifc) {
if (CONNECTED_PREFIX(ifc)->family == AF_INET)
return 1;
}