Commit 3d2307b6 authored by Cesar Prados's avatar Cesar Prados Committed by Adam Wujek

lldp: add snmp support and snmp-agentx

in order to expose the lldp information using
snmp, lldp must be compile with snmp support and
started with the proper switch. Besides snmp needs
the agentx MIB and configure the daemon to enable
a mater agent.
Signed-off-by: Cesar Prados's avatarC.Prados <c.prados@gsi.de>
parent 6bf3a5c0
...@@ -2272,7 +2272,7 @@ BR2_PACKAGE_NETSNMP=y ...@@ -2272,7 +2272,7 @@ BR2_PACKAGE_NETSNMP=y
BR2_PACKAGE_NETSNMP_SERVER=y BR2_PACKAGE_NETSNMP_SERVER=y
BR2_PACKAGE_NETSNMP_CLIENTS=y BR2_PACKAGE_NETSNMP_CLIENTS=y
# BR2_PACKAGE_NETSNMP_ENABLE_MIBS is not set # BR2_PACKAGE_NETSNMP_ENABLE_MIBS is not set
BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES="host ucd-snmp/dlmod if-mib/ifXTable" BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES="host ucd-snmp/dlmod if-mib/ifXTable agentx"
BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES="disman/event disman/schedule utilities" BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES="disman/event disman/schedule utilities"
# BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING is not set # BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING is not set
# BR2_PACKAGE_NETSTAT_NAT is not set # BR2_PACKAGE_NETSTAT_NAT is not set
......
From e5a832ead5fd37822559b5485db0c12c98d060d0 Mon Sep 17 00:00:00 2001 From c136c356d98fdea387581774f609269d276777aa Mon Sep 17 00:00:00 2001
From: Cesar Prados <c.prados@gsi.de> From: Cesar Prados <c.prados@gsi.de>
Date: Mon, 29 May 2017 00:43:20 +0200 Date: Thu, 8 Jun 2017 13:50:15 +0200
Subject: [PATCH] lldp: add patches from buildroot master branch Subject: [PATCH] lldp: add snmp support and netsnmp config path
2017.05-rc2-45-g019ad60
uses the lldp buildroot package of the commit 019ad60
--- ---
...generation-of-atom-glue-compatible-with-o.patch | 43 +++++++++++++++ ...generation-of-atom-glue-compatible-with-o.patch | 43 +++++++++++++++
.../0002-configure-do-not-check-for-libbsd.patch | 61 ++++++++++++++++++++++ .../0002-configure-do-not-check-for-libbsd.patch | 61 ++++++++++++++++++++++
package/lldpd/S60lldpd | 25 +++++++++ package/lldpd/S60lldpd | 25 +++++++++
package/lldpd/lldpd.hash | 2 +- package/lldpd/lldpd.hash | 2 +-
package/lldpd/lldpd.mk | 18 ++++++- package/lldpd/lldpd.mk | 22 ++++++--
5 files changed, 147 insertions(+), 2 deletions(-) 5 files changed, 149 insertions(+), 4 deletions(-)
create mode 100644 package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch create mode 100644 package/lldpd/0001-build-make-generation-of-atom-glue-compatible-with-o.patch
create mode 100644 package/lldpd/0002-configure-do-not-check-for-libbsd.patch create mode 100644 package/lldpd/0002-configure-do-not-check-for-libbsd.patch
create mode 100644 package/lldpd/S60lldpd create mode 100644 package/lldpd/S60lldpd
...@@ -171,7 +171,7 @@ index a6d905b..fc3d21f 100644 ...@@ -171,7 +171,7 @@ index a6d905b..fc3d21f 100644
-sha256 aac11cb1fdc037709517372c70c9bf89c752ab8e5eaab9ce140b84ed5a0507c8 lldpd-0.7.19.tar.gz -sha256 aac11cb1fdc037709517372c70c9bf89c752ab8e5eaab9ce140b84ed5a0507c8 lldpd-0.7.19.tar.gz
+sha256 eb1f5beff2ff5c13c5e0342b5b9da815ed4a63866262445e1168a79ee65c9079 lldpd-0.9.4.tar.gz +sha256 eb1f5beff2ff5c13c5e0342b5b9da815ed4a63866262445e1168a79ee65c9079 lldpd-0.9.4.tar.gz
diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk
index 416967b..951c914 100644 index 416967b..5ee5122 100644
--- a/package/lldpd/lldpd.mk --- a/package/lldpd/lldpd.mk
+++ b/package/lldpd/lldpd.mk +++ b/package/lldpd/lldpd.mk
@@ -4,11 +4,21 @@ @@ -4,11 +4,21 @@
...@@ -181,7 +181,8 @@ index 416967b..951c914 100644 ...@@ -181,7 +181,8 @@ index 416967b..951c914 100644
-LLDPD_VERSION = 0.7.19 -LLDPD_VERSION = 0.7.19
+LLDPD_VERSION = 0.9.4 +LLDPD_VERSION = 0.9.4
LLDPD_SITE = http://media.luffy.cx/files/lldpd LLDPD_SITE = http://media.luffy.cx/files/lldpd
LLDPD_DEPENDENCIES = host-pkgconf libevent -LLDPD_DEPENDENCIES = host-pkgconf libevent
+LLDPD_DEPENDENCIES = host-pkgconf libevent netsnmp
LLDPD_LICENSE = ISC LLDPD_LICENSE = ISC
LLDPD_LICENSE_FILES = README.md LLDPD_LICENSE_FILES = README.md
+# 0002-configure-do-not-check-for-libbsd.patch +# 0002-configure-do-not-check-for-libbsd.patch
...@@ -197,14 +198,20 @@ index 416967b..951c914 100644 ...@@ -197,14 +198,20 @@ index 416967b..951c914 100644
# Detection of c99 support in configure fails without WCHAR. To enable # Detection of c99 support in configure fails without WCHAR. To enable
# automatic detection of c99 support by configure, we need to enable # automatic detection of c99 support by configure, we need to enable
@@ -16,6 +26,7 @@ LLDPD_LICENSE_FILES = README.md @@ -16,11 +26,12 @@ LLDPD_LICENSE_FILES = README.md
# runtime. So requesting WCHAR in toolchain just for automatic detection # runtime. So requesting WCHAR in toolchain just for automatic detection
# will be overkill. To solve this, explicitly -specify c99 here. # will be overkill. To solve this, explicitly -specify c99 here.
LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99 LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99
+LLDPD_CONF_ENV += NETSNMP_CONFIG=$(HOST_DIR)/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/bin/net-snmp-config +LLDPD_CONF_ENV += NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
LLDPD_CONF_OPTS = \ LLDPD_CONF_OPTS = \
--without-readline \ --without-readline \
--without-embedded-libevent \
- --without-snmp \
+ --with-snmp \
--without-xml \
--without-json \
--without-seccomp \
@@ -35,4 +46,9 @@ LLDPD_CONF_OPTS = \ @@ -35,4 +46,9 @@ LLDPD_CONF_OPTS = \
$(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \ $(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \
$(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom) $(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom)
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
# #
CONFIG=/etc/lldpd.conf CONFIG=/etc/lldpd.conf
LLDP=/usr/sbin/lldpd
OPT=-x
case $1 in case $1 in
start) start)
...@@ -14,7 +16,7 @@ case $1 in ...@@ -14,7 +16,7 @@ case $1 in
echo "resume" >> $CONFIG echo "resume" >> $CONFIG
printf "Starting lldpd: " printf "Starting lldpd: "
start-stop-daemon -S -q -p /var/run/lldpd.pid --exec /usr/sbin/lldpd start-stop-daemon -S -q -p /var/run/lldpd.pid -x $LLDP -- $OPT
[ $? = 0 ] && echo "OK" || echo "FAIL" [ $? = 0 ] && echo "OK" || echo "FAIL"
;; ;;
stop) stop)
......
...@@ -16,6 +16,8 @@ authtrapenable 1 ...@@ -16,6 +16,8 @@ authtrapenable 1
#rocommunity CONFIG_SNMP_RO_COMMUNITY #rocommunity CONFIG_SNMP_RO_COMMUNITY
#rwcommunity CONFIG_SNMP_RW_COMMUNITY #rwcommunity CONFIG_SNMP_RW_COMMUNITY
master agentx
# This is picked from /usr/lib, and the first argument is said to be the # This is picked from /usr/lib, and the first argument is said to be the
# "init function", but it is not, because the daemon adds a leading "init_" # "init function", but it is not, because the daemon adds a leading "init_"
dlmod wrsSnmp /wr/lib/wrsSnmp.so dlmod wrsSnmp /wr/lib/wrsSnmp.so
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment