Commit Graph

36 Commits

Author SHA1 Message Date
Hans Dedecker ffd78405f0 net-snmp: InstallDev fix
Commit 384c2a8cfd added support for symlinking
net-snmp-config into $(STAGING_DIR)/usr/bin but forgot to install first
$(STAGING_DIR)/usr/bin resulting into a compile issue if
$(STAGING_DIR)/usr/bin is not yet present.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2018-03-31 09:29:49 +02:00
Stijn Tintel e4165b4452 net-snmp: avoid duplicate section names
It seems that UCI can't handle duplicate section names in a single
config file, even if they use different types. After the previous
commit, running `uci export` results in the following error:

uci: Parse error (section of different type overwrites prior section with same name) at line 17, byte 23

Append a 6 to the com2sec6 section names to solve this.

Fixes: 0e1c8b4ccc ("net-snmp: snmpd: listen on IPv6 by default")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-29 04:36:47 +03:00
Stijn Tintel 0e1c8b4ccc net-snmp: snmpd: listen on IPv6 by default
Closes #4758.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-29 02:45:25 +03:00
Stijn Tintel 8079f86caa net-snmp: add snmptrapd packages
Closes #4724.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-29 02:40:49 +03:00
Stijn Tintel 61769b0786 net-snmp: use LN macro
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-29 01:56:38 +03:00
Stijn Tintel 83a216bcc9 net-snmp: improve snmp-utils description
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-09-29 01:38:37 +03:00
Etienne Champetier 4006865ae8 treewide: run "make check FIXUP=1"
fix Makefile chmod (644)
replace MD5SUM with HASH
add PKG_MIRROR_HASH when PKG_SOURCE_PROTO:=git

(PKG_SOURCE_PROTO:=svn tarballs are not reproducible for now)

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
2017-08-29 21:41:14 -07:00
Hans Dedecker 5878373882 netsnmp: add global enabled config option
Add enabled config option in the global uci section; it allows to put into
place the snmpd config but not yet start the netsnmp daemon.
If config option is unset; netsnmp daemon will be started as before.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-07-10 21:45:37 +02:00
Philip Prindeville 384c2a8cfd net-snmp: add symlink for net-snmp-config into usr/bin
A lot of autoconf-based scripts expect --with-foo-dir=$(STAGING_DIR)/usr
and break if they can't find bin/foo-config as a child of that path.

Putting things in $(STAGING_DIR)/host/bin seems to be suboptimal; I
could change the install path but there's no saying what that would
break.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-06-21 11:53:38 -06:00
Hans Dedecker bb0dfbe6cc net-snmp: add notification config options
Add config support which allow snmpd to take a more active role by sending
traps.

Following config options are supported which map directly on snmpd directives:
-trapcommunity
-trapsink
-trap2sink
-informsink
-authtrapenable
-v1trapaddress
-trapsess

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-06-19 09:00:27 +02:00
Hans Dedecker ae5ee6ba6c net-snmp: add inbound firewall rule support
Add UCI section general which holds the uci parameter network defining on
which interface(s) the snmp agent is reachable for inbound snmp requests
in case the firewall zone does not allow INPUT traffic by default.

For the different zones to which the different interfaces belong firewall
procd input rules are created making the snmp agent reachable on udp port
161.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-05-24 15:03:23 +02:00
Stijn Tintel ec6712fead net-snmp: enable agent/extend MIB
Closes #4085.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-01 12:17:02 +01:00
Stijn Tintel 5081551ae8 net-snmp: add engineID config options
According to the snmpd.conf man page, the engineID of an snmp agent
should be consistent through time. However, it seems that the engineID
changes every reboot. Add options to configure how the engineID is
generated. The default setting generates it based on the MAC address of
the eth0 interface.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-02-14 15:17:07 +01:00
Stijn Tintel 42aeb06308 net-snmpd: convert snmpd-static to dummy package
We believe snmpd-static isn't useful, but download stats show it's still
being downloaded. Instead of dropping it, make it a dummy package that
depends on snmpd.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>
2017-01-15 18:17:58 +01:00
Jo-Philipp Wich 399d0e57cd net-snmp: build against libnl-tiny
Instead of causing nondeterministing conditional compilation depending on
whether libnl-core happens to be present or not, fixup the net-snmp package
to link against libnl-tiny which is present by default on the majority of
systems.

In order to successfully build against libnl-tiny, a number of things had
to be fixed in both the upstream configure and the outer Makefile:

- Add a patch which fixes the upstream configure macros to properly handle
  cases where the cache variables for nl_connect() and netlink.h tests are
  predefined. Without this patch, all subsequent link tests in configure
  will fail, causing the build system to assume functions like opendir() or
  readdir() to be missing, leading to build failures later on due to
  conflicting redefinitions of structures and function prototypes

- In the same patch, stop probing the host systems /usr/include/libnl-3 if
  ac_cv_header_netlink_netlink_h is given. This brings the proprietary
  configure bits in line with the behaviour expected from autoconfig in a
  cross compile setting

- Explicitely request nl support by passing the --with-nl flag to configure

- Pass the required cache variables to skip the broken tests for
  nl_connect() and netlink.h

- Amend TARGET_CPPFLAGS to let net-snmp's build system discover nl-tiny's
  netlink/netlink.h and netlink/socket.h

- Enable the autoreconf fixup to regenerate the broken shipped configure
  from patched macros

- Adjust the depends to unconditionally require libnl-tiny

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-06 16:46:28 +01:00
Stijn Tintel 74e436fac5 net-snmp: fix libnl dependency for snmpd-static
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-06 02:56:03 +01:00
Stijn Tintel 0368739eac net-snmp: enable AgentX support
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-05 14:44:45 +01:00
Stijn Tintel 8915b1e03b net-snmp: fix libnl dependency
When libnl-core is enabled, but libnl isn't, build fails because of a
missing dependency on libnl-3.so.200. Depending on libnl-core seems to
work for both cases.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-04 13:16:56 +01:00
Hans Dedecker 6282bf2114 net-snmp : update to 5.7.3
Update to 5.7.3 by refreshing patches; remove 800-format-security
as upstream integrated.
Add libnl dependency in the package Makefile as net-snmp will check
if libnl is enabled in config_os_libs2.
Remove unneeded PKG_FIXUP build variable.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-04 12:05:34 +01:00
Sven Roederer daeb5fd506 net-snmp: add package snmp-mibs
this installs the default MIBS-files under /usr/share/snmp/mibs .
Also aligns the defines to the same sorting-scheme.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2017-01-03 22:11:21 +01:00
Stijn Tintel e6b554763e net-snmp: take over maintainership
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-03 19:40:59 +01:00
Jo-Philipp Wich 9843f170d7 treewide: replace my defunct email address
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-06-07 12:00:59 +02:00
Stefan Weil 6d2c0fd06f net: Fix typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-10 12:51:10 +02:00
Stijn Tintel 5b1e9eefd0 net-snmp: reload snmpd on interface events
When applying wireless configuration changes, the ifindex of the
wireless interface(s) change. While snmpd picks up the new interfaces
with the correct index, it does not remove the old ones:

IF-MIB::ifName.23 = STRING: wlan0
IF-MIB::ifName.24 = STRING: wlan1
IF-MIB::ifName.25 = STRING: wlan0
IF-MIB::ifName.26 = STRING: wlan1

This causes problems for monitoring tools that use ifName (or ifDesc) as
interface reference. Add a trigger that reloads snmpd on interface
up/down events so that it will no longer have the old interfaces.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-02-20 16:46:17 +01:00
feckert 0c0722926d net-snmp: add service_triggers callback
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Signed-off-by: Helge Mader <hmader@tdt.de>
2015-08-06 12:09:15 +02:00
feckert 8ca22a2a63 net-snmp: add config options
- trap_hostname
- trap_ip
- access_default
- access_HostName
- access_HostIP

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Signed-off-by: Helge Mader <hmader@tdt.de>
2015-08-06 12:01:02 +02:00
Jo-Philipp Wich dceb78b254 Merge pull request #1031 from ionum/master
net-snmp: Enable pass_persist support for snmpd in Makefile
2015-07-01 01:25:52 +02:00
Jo-Philipp Wich fdde981522 net-snmp: fix musl compatibility
Fixup `iwlib.h` to not consider an musl environment to be an unsupported
platform.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 17:47:33 +02:00
ionum 32a8c76d29 Enable pass_persist support for slapd 2015-03-12 16:49:39 +01:00
Stijn Tintel bee2865492 net-snmp: monitor ifindex changes
When an ifindex for an interface changes, some monitoring tools can no
longer find the interface and send alerts. Monitor all network
interfaces via the procd netdev parameter, so that
/etc/init.d/snmpd reload will restart snmpd if any ifindex changed.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-02-18 06:19:59 +01:00
Stijn Tintel 53fc8d3191 net-snmp: cosmetic changes in snmpd init script
- Refactor RUN_C into CONFIGFILE, as used in dnsmasq and igmpproxy init
  scripts.
- Add a newline after each function definition.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-02-18 06:01:19 +01:00
Stijn Tintel 8faff3334f net-snmp: convert snmpd to procd
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-02-18 05:05:27 +01:00
Stijn Tintel e2b43afc85 net-snmp: remove /etc/default/snmpd Debianism
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2015-02-18 04:46:05 +01:00
rcmcronny 29ca0b42b2 Update snmpd.init
add support for "disk <partition> <size>" option

example for /etc/config/snmpd
===========
config disk
	option partition	'/'
	option size		'500'
===========
2014-10-13 10:30:43 +02:00
Steven Barth bf2d6236ea net-snmp: remove spurious libelf dependency
Signed-off-by: Steven Barth <steven@midlink.org>
2014-07-18 11:33:13 +02:00
Jo-Philipp Wich 7c00700f58 net-snmp: import from oldpackages, add myself as maintainer, add license information, update to v5.4.4, refresh patches
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2014-07-02 14:25:45 +02:00