summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
Diffstat (limited to 'ripd')
-rw-r--r--ripd/Makefile.am2
-rw-r--r--ripd/rip_snmp.c18
2 files changed, 13 insertions, 7 deletions
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
index 2fa26659..b0bc7a87 100644
--- a/ripd/Makefile.am
+++ b/ripd/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)/\"
INSTALL_SDATA=@INSTALL@ -m 600
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 61c47c71..090ebfae 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_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"
@@ -351,6 +345,10 @@ rip2IfStatEntry (struct variable *v, oid name[], size_t *length,
static struct in_addr addr;
static long valid = SNMP_VALID;
+ if (smux_header_table(v, name, length, exact, var_len, write_method)
+ == MATCH_FAILED)
+ return NULL;
+
memset (&addr, 0, sizeof (struct in_addr));
/* Lookup interface. */
@@ -454,6 +452,10 @@ rip2IfConfAddress (struct variable *v, oid name[], size_t *length,
struct interface *ifp;
struct rip_interface *ri;
+ if (smux_header_table(v, name, length, exact, val_len, write_method)
+ == MATCH_FAILED)
+ return NULL;
+
memset (&addr, 0, sizeof (struct in_addr));
/* Lookup interface. */
@@ -524,6 +526,10 @@ rip2PeerTable (struct variable *v, oid name[], size_t *length,
struct rip_peer *peer;
+ if (smux_header_table(v, name, length, exact, val_len, write_method)
+ == MATCH_FAILED)
+ return NULL;
+
memset (&addr, 0, sizeof (struct in_addr));
/* Lookup interface. */