diff options
Diffstat (limited to 'ripd/rip_snmp.c')
| -rw-r--r-- | ripd/rip_snmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c index 9acc825c0a..54c8a2eb8c 100644 --- a/ripd/rip_snmp.c +++ b/ripd/rip_snmp.c @@ -160,13 +160,16 @@ static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length, == MATCH_FAILED) return NULL; + if (!rip) + return NULL; + /* Retrun global counter. */ switch (v->magic) { case RIP2GLOBALROUTECHANGES: - return SNMP_INTEGER(rip_global_route_changes); + return SNMP_INTEGER(rip->counters.route_changes); break; case RIP2GLOBALQUERIES: - return SNMP_INTEGER(rip_global_queries); + return SNMP_INTEGER(rip->counters.queries); break; default: return NULL; |
