summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_snmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_snmp.c')
-rw-r--r--ospf6d/ospf6_snmp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 57cc055296..6e24be6a1e 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -637,7 +637,7 @@ static uint8_t *ospfv3GeneralGroup(struct variable *v, oid *name,
{
uint16_t sum;
uint32_t count;
- struct ospf6_lsa *lsa = NULL;
+ struct ospf6_lsa *lsa = NULL, *lsanext;
/* Check whether the instance identifier is valid */
if (smux_header_generic(v, name, length, exact, var_len, write_method)
@@ -679,7 +679,7 @@ static uint8_t *ospfv3GeneralGroup(struct variable *v, oid *name,
case OSPFv3ASSCOPELSACHECKSUMSUM:
if (ospf6) {
sum = 0;
- for (ALL_LSDB(ospf6->lsdb, lsa))
+ for (ALL_LSDB(ospf6->lsdb, lsa, lsanext))
sum += ntohs(lsa->header->checksum);
return SNMP_INTEGER(sum);
}
@@ -733,7 +733,7 @@ static uint8_t *ospfv3AreaEntry(struct variable *v, oid *name, size_t *length,
WriteMethod **write_method)
{
struct ospf6_area *oa, *area = NULL;
- struct ospf6_lsa *lsa = NULL;
+ struct ospf6_lsa *lsa = NULL, *lsanext;
uint32_t area_id = 0;
uint32_t count;
uint16_t sum;
@@ -808,7 +808,7 @@ static uint8_t *ospfv3AreaEntry(struct variable *v, oid *name, size_t *length,
return SNMP_INTEGER(area->lsdb->count);
case OSPFv3AREASCOPELSACKSUMSUM:
sum = 0;
- for (ALL_LSDB(area->lsdb, lsa))
+ for (ALL_LSDB(area->lsdb, lsa, lsanext))
sum += ntohs(lsa->header->checksum);
return SNMP_INTEGER(sum);
case OSPFv3AREASUMMARY:
@@ -1044,7 +1044,7 @@ static uint8_t *ospfv3IfEntry(struct variable *v, oid *name, size_t *length,
ifindex_t ifindex = 0;
unsigned int instid = 0;
struct ospf6_interface *oi = NULL;
- struct ospf6_lsa *lsa = NULL;
+ struct ospf6_lsa *lsa = NULL, *lsanext;
struct interface *iif;
struct listnode *i;
struct list *ifslist;
@@ -1171,7 +1171,7 @@ static uint8_t *ospfv3IfEntry(struct variable *v, oid *name, size_t *length,
return SNMP_INTEGER(oi->lsdb->count);
case OSPFv3IFLINKLSACKSUMSUM:
sum = 0;
- for (ALL_LSDB(oi->lsdb, lsa))
+ for (ALL_LSDB(oi->lsdb, lsa, lsanext))
sum += ntohs(lsa->header->checksum);
return SNMP_INTEGER(sum);
case OSPFv3IFDEMANDNBRPROBE: