--- embedaddon/quagga/ospf6d/ospf6_snmp.c 2013/07/21 23:54:40 1.1.1.2 +++ embedaddon/quagga/ospf6d/ospf6_snmp.c 2016/11/02 10:09:11 1.1.1.3 @@ -40,6 +40,8 @@ #include "ospf6_interface.h" #include "ospf6_message.h" #include "ospf6_neighbor.h" +#include "ospf6_abr.h" +#include "ospf6_asbr.h" #include "ospf6d.h" #include "ospf6_snmp.h" @@ -488,7 +490,9 @@ ospfv3GeneralGroup (struct variable *v, oid *name, siz case OSPFv3DEMANDEXTENSIONS: return SNMP_INTEGER (0); /* Not supported */ case OSPFv3REFERENCEBANDWIDTH: - return SNMP_INTEGER (100000); + if (ospf6) + return SNMP_INTEGER (ospf6->ref_bandwidth); + /* Otherwise, like for "not implemented". */ case OSPFv3RESTARTSUPPORT: case OSPFv3RESTARTINTERVAL: case OSPFv3RESTARTSTRICTLSACHECKING: @@ -528,7 +532,7 @@ ospfv3AreaEntry (struct variable *v, oid *name, size_t return NULL; len = *length - v->namelen; - len = (len >= 1 ? sizeof 1 : 0); + len = (len >= 1 ? 1 : 0); if (exact && len != 1) return NULL; if (len) @@ -619,13 +623,12 @@ ospfv3WwLsdbEntry (struct variable *v, oid *name, size int exact, size_t *var_len, WriteMethod **write_method) { struct ospf6_lsa *lsa = NULL; - u_int32_t ifindex, area_id, id, instid, adv_router; + ifindex_t ifindex, area_id, id, instid, adv_router; u_int16_t type; int len; oid *offset; int offsetlen; - char a[16], b[16], c[16]; - struct ospf6_area *oa; + struct ospf6_area *oa = NULL; struct listnode *node; struct interface *iif; struct ospf6_interface *oi = NULL; @@ -832,7 +835,8 @@ static u_char * ospfv3IfEntry (struct variable *v, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) { - unsigned int ifindex, instid; + ifindex_t ifindex = 0; + unsigned int instid = 0; struct ospf6_interface *oi = NULL; struct ospf6_lsa *lsa = NULL; struct interface *iif; @@ -846,8 +850,6 @@ ospfv3IfEntry (struct variable *v, oid *name, size_t * == MATCH_FAILED) return NULL; - ifindex = instid = 0; - /* Check OSPFv3 instance. */ if (ospf6 == NULL) return NULL; @@ -985,7 +987,8 @@ static u_char * ospfv3NbrEntry (struct variable *v, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) { - unsigned int ifindex, instid, rtrid; + ifindex_t ifindex = 0; + unsigned int instid, rtrid; struct ospf6_interface *oi = NULL; struct ospf6_neighbor *on = NULL; struct interface *iif; @@ -998,7 +1001,7 @@ ospfv3NbrEntry (struct variable *v, oid *name, size_t == MATCH_FAILED) return NULL; - ifindex = instid = rtrid = 0; + instid = rtrid = 0; /* Check OSPFv3 instance. */ if (ospf6 == NULL)