]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_snmp.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / ospfd / ospf_snmp.c
index 7464b14b1f71a2e77414cab4b6470f327ef5233f..755634a2f166c5d2d9935351a016a71a7b1b3cc1 100644 (file)
@@ -47,6 +47,7 @@
 #include "ospfd/ospf_flood.h"
 #include "ospfd/ospf_ism.h"
 #include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_route.h"
 #include "ospfd/ospf_zebra.h"
 
 /* OSPF2-MIB. */
@@ -994,7 +995,6 @@ static struct ospf_lsa *ospfLsdbLookup(struct variable *v, oid *name,
                        if (len <= 0)
                                type_next = 1;
                        else {
-                               len = 1;
                                type_next = 0;
                                *type = *offset;
                        }
@@ -1626,7 +1626,7 @@ static struct ospf_interface *ospfIfLookup(struct variable *v, oid *name,
                len = *length - v->namelen;
                if (len >= IN_ADDR_SIZE)
                        len = IN_ADDR_SIZE;
-               if (len <= 0)
+               if (len == 0)
                        ifaddr_next = 1;
 
                oid2in_addr(name + v->namelen, len, ifaddr);
@@ -1990,7 +1990,7 @@ ospfVirtIfLookup(struct variable *v, oid *name, size_t *length,
                first = 0;
 
                len = *length - v->namelen;
-               if (len <= 0)
+               if (len == 0)
                        first = 1;
                if (len > IN_ADDR_SIZE)
                        len = IN_ADDR_SIZE;
@@ -2117,7 +2117,7 @@ static struct ospf_neighbor *ospf_snmp_nbr_lookup_next(struct in_addr *nbr_addr,
        struct ospf_neighbor *nbr;
        struct route_node *rn;
        struct ospf_neighbor *min = NULL;
-       struct ospf *ospf = ospf;
+       struct ospf *ospf;
 
        ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
 
@@ -2176,7 +2176,7 @@ static struct ospf_neighbor *ospfNbrLookup(struct variable *v, oid *name,
                first = 0;
                len = *length - v->namelen;
 
-               if (len <= 0)
+               if (len == 0)
                        first = 1;
 
                if (len > IN_ADDR_SIZE)