summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2012-07-13 14:05:36 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2012-07-13 14:05:40 +0200
commit18a4e3715f89337ac8b70f6f63cc131c3218c82c (patch)
tree1b38b2eae4e1cee042f96a42217b14647159bf0f /zebra
parenta47c5838e9f445ab887ad927706b11ccbb181364 (diff)
parent8046ba6ec4d6e87bf8da6563c0f3e5e66c4652b3 (diff)
Merge remote branch 'vincentbernat/feature/agentx'
Diffstat (limited to 'zebra')
-rw-r--r--zebra/Makefile.am2
-rw-r--r--zebra/zebra_snmp.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index 542f36f4..9ac90f8e 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in.
-INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib @SNMP_INCLUDES@
+INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@
INSTALL_SDATA=@INSTALL@ -m 600
diff --git a/zebra/zebra_snmp.c b/zebra/zebra_snmp.c
index 0fde4bb8..f52bbcb8 100644
--- a/zebra/zebra_snmp.c
+++ b/zebra/zebra_snmp.c
@@ -22,14 +22,8 @@
#include <zebra.h>
#ifdef HAVE_SNMP
-#ifdef HAVE_NETSNMP
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#else
-#include <asn1.h>
-#include <snmp.h>
-#include <snmp_impl.h>
-#endif
#include "if.h"
#include "log.h"
@@ -457,6 +451,10 @@ ipFwTable (struct variable *v, oid objid[], size_t *objid_len,
static struct in_addr netmask;
struct nexthop *nexthop;
+ if (smux_header_table(v, objid, objid_len, exact, val_len, write_method)
+ == MATCH_FAILED)
+ return NULL;
+
get_fwtable_route_node(v, objid, objid_len, exact, &np, &rib);
if (!np)
return NULL;
@@ -555,6 +553,10 @@ static u_char *
ipCidrTable (struct variable *v, oid objid[], size_t *objid_len,
int exact, size_t *val_len, WriteMethod **write_method)
{
+ if (smux_header_table(v, objid, objid_len, exact, val_len, write_method)
+ == MATCH_FAILED)
+ return NULL;
+
switch (v->magic)
{
case IPCIDRROUTEDEST: