*: fixup snmp support

- HAVE_POLL is overloaded by net-snmp
- missing includes
- ospf6_snmp converted to vrf_iflist()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2016-07-27 19:39:44 +02:00 committed by Donald Sharp
parent df08c28ed6
commit d11f748b30
3 changed files with 18 additions and 3 deletions

View File

@ -27,6 +27,7 @@
#include "command.h"
#include "smux.h"
#include "memory.h"
int agentx_enabled = 0;

View File

@ -33,11 +33,23 @@
#include "sigevent.h"
#if defined HAVE_SNMP && defined SNMP_AGENTX
#ifdef HAVE_POLL
#define QUAGGA_HAVE_POLL
#endif
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/snmp_vars.h>
#ifdef HAVE_POLL
#undef HAVE_POLL
#endif
#ifdef QUAGGA_HAVE_POLL
#define HAVE_POLL
#endif
extern int agentx_enabled;
#endif

View File

@ -29,6 +29,8 @@
#include "log.h"
#include "vty.h"
#include "linklist.h"
#include "vector.h"
#include "vrf.h"
#include "smux.h"
#include "ospf6_proto.h"
@ -749,7 +751,7 @@ ospfv3WwLsdbEntry (struct variable *v, oid *name, size_t *length,
ifslist = list_new ();
if (!ifslist) return NULL;
ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
for (ALL_LIST_ELEMENTS_RO (iflist, node, iif))
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, iif))
listnode_add_sort (ifslist, iif);
for (ALL_LIST_ELEMENTS_RO (ifslist, node, iif))
@ -887,7 +889,7 @@ ospfv3IfEntry (struct variable *v, oid *name, size_t *length,
ifslist = list_new ();
if (!ifslist) return NULL;
ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
for (ALL_LIST_ELEMENTS_RO (iflist, i, iif))
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), i, iif))
listnode_add_sort (ifslist, iif);
for (ALL_LIST_ELEMENTS_RO (ifslist, i, iif))
@ -1047,7 +1049,7 @@ ospfv3NbrEntry (struct variable *v, oid *name, size_t *length,
ifslist = list_new ();
if (!ifslist) return NULL;
ifslist->cmp = (int (*)(void *, void *))if_icmp_func;
for (ALL_LIST_ELEMENTS_RO (iflist, i, iif))
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), i, iif))
listnode_add_sort (ifslist, iif);
for (ALL_LIST_ELEMENTS_RO (ifslist, i, iif))