net-snmp: Update to 5.7.3
This is a minor update to the latest available version of net-snmp. * Drop SELinux support. Fixes #11216. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
parent
511f2021c9
commit
c74c6a7588
|
@ -4,8 +4,8 @@
|
|||
###############################################################################
|
||||
|
||||
name = net-snmp
|
||||
version = 5.7.2
|
||||
release = 3
|
||||
version = 5.7.3
|
||||
release = 1
|
||||
|
||||
groups = Networking/Daemons
|
||||
url = http://net-snmp.sourceforge.net
|
||||
|
@ -27,7 +27,6 @@ build
|
|||
bzip2-devel
|
||||
chrpath
|
||||
elfutils-devel
|
||||
libselinux-devel
|
||||
lm-sensors-devel >= 3
|
||||
openssl-devel
|
||||
perl(ExtUtils::Embed)
|
||||
|
|
|
@ -11,15 +11,15 @@ the code to 'any subsequent version of this License published by Apple'.
|
|||
According to http://fedoraproject.org/wiki/Licensing, APSL ver. 2.0 is
|
||||
better for us.
|
||||
|
||||
diff -up net-snmp-5.5/COPYING.apsl net-snmp-5.5/COPYING
|
||||
--- net-snmp-5.5/COPYING.apsl 2010-08-04 12:40:27.494479126 +0200
|
||||
+++ net-snmp-5.5/COPYING 2010-08-04 12:45:47.713684755 +0200
|
||||
@@ -292,3 +292,337 @@ ON ANY THEORY OF LIABILITY, WHETHER IN C
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
diff -up net-snmp-5.7.3/COPYING.skiFvk net-snmp-5.7.3/COPYING
|
||||
--- net-snmp-5.7.3/COPYING.skiFvk 2015-02-17 13:33:15.963257594 +0100
|
||||
+++ net-snmp-5.7.3/COPYING 2015-02-17 13:33:37.931241818 +0100
|
||||
@@ -325,3 +325,337 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEV
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+
|
||||
+---- Part 10: APPLE PUBLIC SOURCE LICENSE (APSL 2.0) ----
|
||||
+---- Part 11: APPLE PUBLIC SOURCE LICENSE (APSL 2.0) ----
|
||||
+
|
||||
+Version 2.0 - August 6, 2003
|
||||
+
|
||||
|
@ -333,8 +333,8 @@ diff -up net-snmp-5.5/COPYING.apsl net-snmp-5.5/COPYING
|
|||
+
|
||||
+Where You are located in the province of Quebec, Canada, the following clause
|
||||
+applies: The parties hereby confirm that they have requested that this License
|
||||
+and all related documents be drafted in English. Les parties ont exigé que le
|
||||
+présent contrat et tous les documents connexes soient rédigés en anglais.
|
||||
+and all related documents be drafted in English. Les parties ont exige que le
|
||||
+present contrat et tous les documents connexes soient rediges en anglais.
|
||||
+
|
||||
+EXHIBIT A.
|
||||
+
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
Make the man pages multilib safe.
|
||||
|
||||
diff -up net-snmp-5.6/man/netsnmp_config_api.3.def.multilib net-snmp-5.6/man/netsnmp_config_api.3.def
|
||||
--- net-snmp-5.6/man/netsnmp_config_api.3.def.multilib 2010-09-08 17:41:37.000000000 +0200
|
||||
+++ net-snmp-5.6/man/netsnmp_config_api.3.def 2010-10-25 17:40:43.433726423 +0200
|
||||
diff -up net-snmp-5.7.3/man/netsnmp_config_api.3.def.oSBcEB net-snmp-5.7.3/man/netsnmp_config_api.3.def
|
||||
--- net-snmp-5.7.3/man/netsnmp_config_api.3.def.oSBcEB 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/man/netsnmp_config_api.3.def 2015-02-17 13:32:38.903284207 +0100
|
||||
@@ -295,7 +295,7 @@ for one particular machine.
|
||||
.PP
|
||||
The default list of directories to search is \fC SYSCONFDIR/snmp\fP,
|
||||
|
@ -19,24 +17,24 @@ diff -up net-snmp-5.6/man/netsnmp_config_api.3.def.multilib net-snmp-5.6/man/net
|
|||
-Default: SYSCONFDIR/snmp:DATADIR/snmp:LIBDIR/snmp:$HOME/.snmp
|
||||
+Default: SYSCONFDIR/snmp:DATADIR/snmp:/usr/lib(64)/snmp:$HOME/.snmp
|
||||
.SH "SEE ALSO"
|
||||
.BR mib_api "(3), " snmp_api (3)
|
||||
netsnmp_mib_api(3), snmp_api(3)
|
||||
.\" Local Variables:
|
||||
diff -up net-snmp-5.6/man/snmp_config.5.def.multilib net-snmp-5.6/man/snmp_config.5.def
|
||||
--- net-snmp-5.6/man/snmp_config.5.def.multilib 2010-09-17 11:51:52.000000000 +0200
|
||||
+++ net-snmp-5.6/man/snmp_config.5.def 2010-10-25 17:40:12.681976439 +0200
|
||||
diff -up net-snmp-5.7.3/man/snmp_config.5.def.oSBcEB net-snmp-5.7.3/man/snmp_config.5.def
|
||||
--- net-snmp-5.7.3/man/snmp_config.5.def.oSBcEB 2015-02-17 13:32:04.251309092 +0100
|
||||
+++ net-snmp-5.7.3/man/snmp_config.5.def 2015-02-17 13:33:09.217262438 +0100
|
||||
@@ -10,7 +10,7 @@ First off, there are numerous places tha
|
||||
found and read from. By default, the applications look for
|
||||
configuration files in the following 4 directories, in order:
|
||||
SYSCONFDIR/snmp,
|
||||
-DATADIR/snmp, LIBDIR/snmp, and $HOME/.snmp. In each of these
|
||||
+DATADIR/snmp, /usr/lib(64)/snmp, and $HOME/.snmp. In each of these
|
||||
directories, it looks for files with the extension of both
|
||||
.IR conf " and " local.conf
|
||||
(reading the second ones last). In this manner, there are
|
||||
diff -up net-snmp-5.6/man/snmpd.conf.5.def.multilib net-snmp-5.6/man/snmpd.conf.5.def
|
||||
--- net-snmp-5.6/man/snmpd.conf.5.def.multilib 2010-09-17 11:51:52.000000000 +0200
|
||||
+++ net-snmp-5.6/man/snmpd.conf.5.def 2010-10-25 17:40:12.682976925 +0200
|
||||
@@ -1387,7 +1387,7 @@ filename), and call the initialisation r
|
||||
directories, it looks for files snmp.conf, snmpd.conf and/or
|
||||
snmptrapd.conf, as well as snmp.local.conf, snmpd.local.conf
|
||||
and/or snmptrapd.local.conf. *.local.conf are always
|
||||
diff -up net-snmp-5.7.3/man/snmpd.conf.5.def.oSBcEB net-snmp-5.7.3/man/snmpd.conf.5.def
|
||||
--- net-snmp-5.7.3/man/snmpd.conf.5.def.oSBcEB 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/man/snmpd.conf.5.def 2015-02-17 13:32:04.251309092 +0100
|
||||
@@ -1502,7 +1502,7 @@ filename), and call the initialisation r
|
||||
.RS
|
||||
.IP "Note:"
|
||||
If the specified PATH is not a fully qualified filename, it will
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
895357 - net-snmp-python adds zeros to end of IP address (IPADDR type), which is not valid
|
||||
|
||||
Source: upstream commit 234158b8e84cc204cbac96e6e9be6959635404b8
|
||||
|
||||
--- a/python/netsnmp/client_intf.c
|
||||
+++ a/python/netsnmp/client_intf.c
|
||||
@@ -821,14 +821,14 @@ OCT:
|
||||
|
||||
case TYPE_IPADDR:
|
||||
vars->type = ASN_IPADDRESS;
|
||||
- vars->val.integer = (long *)malloc(sizeof(long));
|
||||
+ vars->val.integer = (in_addr_t *)malloc(sizeof(in_addr_t));
|
||||
if (val)
|
||||
*(vars->val.integer) = inet_addr(val);
|
||||
else {
|
||||
ret = FAILURE;
|
||||
*(vars->val.integer) = 0;
|
||||
}
|
||||
- vars->val_len = sizeof(long);
|
||||
+ vars->val_len = sizeof(in_addr_t);
|
||||
break;
|
||||
|
||||
case TYPE_OBJID:
|
|
@ -57,10 +57,9 @@ Date: Tue Aug 9 10:53:43 2011 +0200
|
|||
- update WantedBy in socket units as recommended by http://0pointer.de/blog/projects/socket-activation.html
|
||||
- rephrase README.systemd
|
||||
|
||||
|
||||
diff -up net-snmp-5.7.2/agent/snmpd.c.systemd net-snmp-5.7.2/agent/snmpd.c
|
||||
--- net-snmp-5.7.2/agent/snmpd.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/agent/snmpd.c 2012-11-12 10:18:46.084369548 +0100
|
||||
diff -up net-snmp-5.7.3/agent/snmpd.c.MPGqYh net-snmp-5.7.3/agent/snmpd.c
|
||||
--- net-snmp-5.7.3/agent/snmpd.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/agent/snmpd.c 2015-02-17 13:34:05.736221851 +0100
|
||||
@@ -164,6 +164,10 @@ typedef long fd_mask;
|
||||
|
||||
#endif
|
||||
|
@ -72,7 +71,7 @@ diff -up net-snmp-5.7.2/agent/snmpd.c.systemd net-snmp-5.7.2/agent/snmpd.c
|
|||
netsnmp_feature_want(logging_file)
|
||||
netsnmp_feature_want(logging_stdio)
|
||||
netsnmp_feature_want(logging_syslog)
|
||||
@@ -441,18 +445,26 @@ main(int argc, char *argv[])
|
||||
@@ -443,18 +447,26 @@ main(int argc, char *argv[])
|
||||
int agent_mode = -1;
|
||||
char *pid_file = NULL;
|
||||
char option_compatability[] = "-Le";
|
||||
|
@ -101,7 +100,7 @@ diff -up net-snmp-5.7.2/agent/snmpd.c.systemd net-snmp-5.7.2/agent/snmpd.c
|
|||
}
|
||||
#endif /* #WIN32 */
|
||||
|
||||
@@ -1100,6 +1112,19 @@ main(int argc, char *argv[])
|
||||
@@ -1107,6 +1119,19 @@ main(int argc, char *argv[])
|
||||
netsnmp_addrcache_initialise();
|
||||
|
||||
/*
|
||||
|
@ -121,9 +120,9 @@ diff -up net-snmp-5.7.2/agent/snmpd.c.systemd net-snmp-5.7.2/agent/snmpd.c
|
|||
* Forever monitor the dest_port for incoming PDUs.
|
||||
*/
|
||||
DEBUGMSGTL(("snmpd/main", "We're up. Starting to process data.\n"));
|
||||
diff -up net-snmp-5.7.2/apps/snmptrapd.c.systemd net-snmp-5.7.2/apps/snmptrapd.c
|
||||
--- net-snmp-5.7.2/apps/snmptrapd.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/apps/snmptrapd.c 2012-11-12 10:18:46.084369548 +0100
|
||||
diff -up net-snmp-5.7.3/apps/snmptrapd.c.MPGqYh net-snmp-5.7.3/apps/snmptrapd.c
|
||||
--- net-snmp-5.7.3/apps/snmptrapd.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/apps/snmptrapd.c 2015-02-17 13:34:05.736221851 +0100
|
||||
@@ -125,6 +125,10 @@ SOFTWARE.
|
||||
|
||||
#include <net-snmp/net-snmp-features.h>
|
||||
|
@ -135,7 +134,7 @@ diff -up net-snmp-5.7.2/apps/snmptrapd.c.systemd net-snmp-5.7.2/apps/snmptrapd.c
|
|||
#ifndef BSD4_3
|
||||
#define BSD4_2
|
||||
#endif
|
||||
@@ -655,15 +659,22 @@ main(int argc, char *argv[])
|
||||
@@ -657,15 +661,22 @@ main(int argc, char *argv[])
|
||||
int agentx_subagent = 1;
|
||||
#endif
|
||||
netsnmp_trapd_handler *traph;
|
||||
|
@ -160,7 +159,7 @@ diff -up net-snmp-5.7.2/apps/snmptrapd.c.systemd net-snmp-5.7.2/apps/snmptrapd.c
|
|||
}
|
||||
#endif /* #WIN32 */
|
||||
|
||||
@@ -1311,6 +1322,19 @@ main(int argc, char *argv[])
|
||||
@@ -1318,6 +1329,19 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -180,9 +179,9 @@ diff -up net-snmp-5.7.2/apps/snmptrapd.c.systemd net-snmp-5.7.2/apps/snmptrapd.c
|
|||
#ifdef WIN32SERVICE
|
||||
trapd_status = SNMPTRAPD_RUNNING;
|
||||
#endif
|
||||
diff -up net-snmp-5.7.2/configure.d/config_modules_lib.systemd net-snmp-5.7.2/configure.d/config_modules_lib
|
||||
--- net-snmp-5.7.2/configure.d/config_modules_lib.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/configure.d/config_modules_lib 2012-11-12 10:18:46.085369546 +0100
|
||||
diff -up net-snmp-5.7.3/configure.d/config_modules_lib.MPGqYh net-snmp-5.7.3/configure.d/config_modules_lib
|
||||
--- net-snmp-5.7.3/configure.d/config_modules_lib.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/configure.d/config_modules_lib 2015-02-17 13:34:05.737221850 +0100
|
||||
@@ -53,6 +53,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
|
||||
other_ftobjs_list="$other_ftobjs_list winpipe.ft"
|
||||
fi
|
||||
|
@ -198,9 +197,9 @@ diff -up net-snmp-5.7.2/configure.d/config_modules_lib.systemd net-snmp-5.7.2/co
|
|||
AC_SUBST(other_src_list)
|
||||
AC_SUBST(other_objs_list)
|
||||
AC_SUBST(other_lobjs_list)
|
||||
diff -up net-snmp-5.7.2/configure.d/config_project_with_enable.systemd net-snmp-5.7.2/configure.d/config_project_with_enable
|
||||
--- net-snmp-5.7.2/configure.d/config_project_with_enable.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/configure.d/config_project_with_enable 2012-11-12 10:18:46.086369544 +0100
|
||||
diff -up net-snmp-5.7.3/configure.d/config_project_with_enable.MPGqYh net-snmp-5.7.3/configure.d/config_project_with_enable
|
||||
--- net-snmp-5.7.3/configure.d/config_project_with_enable.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/configure.d/config_project_with_enable 2015-02-17 13:34:05.737221850 +0100
|
||||
@@ -690,6 +690,15 @@ if test "x$with_dummy_values" != "xyes";
|
||||
data for])
|
||||
fi
|
||||
|
@ -217,10 +216,10 @@ diff -up net-snmp-5.7.2/configure.d/config_project_with_enable.systemd net-snmp-
|
|||
NETSNMP_ARG_ENABLE(set-support,
|
||||
[ --disable-set-support Do not allow SNMP set requests.])
|
||||
if test "x$enable_set_support" = "xno"; then
|
||||
diff -up net-snmp-5.7.2/configure.systemd net-snmp-5.7.2/configure
|
||||
--- net-snmp-5.7.2/configure.systemd 2012-10-10 00:35:37.000000000 +0200
|
||||
+++ net-snmp-5.7.2/configure 2012-11-12 10:18:46.099369517 +0100
|
||||
@@ -950,6 +950,8 @@ with_kmem_usage
|
||||
diff -up net-snmp-5.7.3/configure.MPGqYh net-snmp-5.7.3/configure
|
||||
--- net-snmp-5.7.3/configure.MPGqYh 2014-12-08 21:23:37.000000000 +0100
|
||||
+++ net-snmp-5.7.3/configure 2015-02-17 13:34:05.744221845 +0100
|
||||
@@ -951,6 +951,8 @@ with_kmem_usage
|
||||
enable_kmem_usage
|
||||
with_dummy_values
|
||||
enable_dummy_values
|
||||
|
@ -229,7 +228,7 @@ diff -up net-snmp-5.7.2/configure.systemd net-snmp-5.7.2/configure
|
|||
enable_set_support
|
||||
with_set_support
|
||||
with_sys_contact
|
||||
@@ -1866,6 +1868,8 @@ Configuring the agent:
|
||||
@@ -1867,6 +1869,8 @@ Configuring the agent:
|
||||
This is technically not compliant with the
|
||||
SNMP specifications, but was how the agent
|
||||
operated for versions < 4.0.
|
||||
|
@ -238,7 +237,7 @@ diff -up net-snmp-5.7.2/configure.systemd net-snmp-5.7.2/configure
|
|||
--with-sys-contact="who@where" Default system contact.
|
||||
(Default: LOGIN@DOMAINNAME)
|
||||
--with-sys-location="location" Default system location.
|
||||
@@ -4397,6 +4401,24 @@ $as_echo "#define NETSNMP_NO_DUMMY_VALUE
|
||||
@@ -4398,6 +4402,24 @@ $as_echo "#define NETSNMP_NO_DUMMY_VALUE
|
||||
|
||||
fi
|
||||
|
||||
|
@ -263,7 +262,7 @@ diff -up net-snmp-5.7.2/configure.systemd net-snmp-5.7.2/configure
|
|||
# Check whether --enable-set-support was given.
|
||||
if test "${enable_set_support+set}" = set; then :
|
||||
enableval=$enable_set_support;
|
||||
@@ -18239,6 +18261,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
|
||||
@@ -18639,6 +18661,14 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
|
||||
other_ftobjs_list="$other_ftobjs_list winpipe.ft"
|
||||
fi
|
||||
|
||||
|
@ -278,9 +277,9 @@ diff -up net-snmp-5.7.2/configure.systemd net-snmp-5.7.2/configure
|
|||
|
||||
|
||||
|
||||
diff -up net-snmp-5.7.2/dist/snmpd.service.systemd net-snmp-5.7.2/dist/snmpd.service
|
||||
--- net-snmp-5.7.2/dist/snmpd.service.systemd 2012-11-12 10:18:46.104369507 +0100
|
||||
+++ net-snmp-5.7.2/dist/snmpd.service 2012-11-12 10:18:46.104369507 +0100
|
||||
diff -up net-snmp-5.7.3/dist/snmpd.service.MPGqYh net-snmp-5.7.3/dist/snmpd.service
|
||||
--- net-snmp-5.7.3/dist/snmpd.service.MPGqYh 2015-02-17 13:34:05.745221844 +0100
|
||||
+++ net-snmp-5.7.3/dist/snmpd.service 2015-02-17 13:34:05.745221844 +0100
|
||||
@@ -0,0 +1,18 @@
|
||||
+#
|
||||
+# SNMP agent service file for systemd
|
||||
|
@ -300,9 +299,9 @@ diff -up net-snmp-5.7.2/dist/snmpd.service.systemd net-snmp-5.7.2/dist/snmpd.ser
|
|||
+
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
diff -up net-snmp-5.7.2/dist/snmpd.socket.systemd net-snmp-5.7.2/dist/snmpd.socket
|
||||
--- net-snmp-5.7.2/dist/snmpd.socket.systemd 2012-11-12 10:18:46.104369507 +0100
|
||||
+++ net-snmp-5.7.2/dist/snmpd.socket 2012-11-12 10:18:46.104369507 +0100
|
||||
diff -up net-snmp-5.7.3/dist/snmpd.socket.MPGqYh net-snmp-5.7.3/dist/snmpd.socket
|
||||
--- net-snmp-5.7.3/dist/snmpd.socket.MPGqYh 2015-02-17 13:34:05.745221844 +0100
|
||||
+++ net-snmp-5.7.3/dist/snmpd.socket 2015-02-17 13:34:05.745221844 +0100
|
||||
@@ -0,0 +1,17 @@
|
||||
+[Unit]
|
||||
+Description=Socket listening for SNMP and AgentX messages
|
||||
|
@ -321,9 +320,9 @@ diff -up net-snmp-5.7.2/dist/snmpd.socket.systemd net-snmp-5.7.2/dist/snmpd.sock
|
|||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
||||
diff -up net-snmp-5.7.2/dist/snmptrapd.service.systemd net-snmp-5.7.2/dist/snmptrapd.service
|
||||
--- net-snmp-5.7.2/dist/snmptrapd.service.systemd 2012-11-12 10:18:46.105369505 +0100
|
||||
+++ net-snmp-5.7.2/dist/snmptrapd.service 2012-11-12 10:18:46.105369505 +0100
|
||||
diff -up net-snmp-5.7.3/dist/snmptrapd.service.MPGqYh net-snmp-5.7.3/dist/snmptrapd.service
|
||||
--- net-snmp-5.7.3/dist/snmptrapd.service.MPGqYh 2015-02-17 13:34:05.745221844 +0100
|
||||
+++ net-snmp-5.7.3/dist/snmptrapd.service 2015-02-17 13:34:05.745221844 +0100
|
||||
@@ -0,0 +1,16 @@
|
||||
+#
|
||||
+# SNMP trap-processing service file for systemd
|
||||
|
@ -341,9 +340,9 @@ diff -up net-snmp-5.7.2/dist/snmptrapd.service.systemd net-snmp-5.7.2/dist/snmpt
|
|||
+
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
diff -up net-snmp-5.7.2/dist/snmptrapd.socket.systemd net-snmp-5.7.2/dist/snmptrapd.socket
|
||||
--- net-snmp-5.7.2/dist/snmptrapd.socket.systemd 2012-11-12 10:18:46.105369505 +0100
|
||||
+++ net-snmp-5.7.2/dist/snmptrapd.socket 2012-11-12 10:18:46.105369505 +0100
|
||||
diff -up net-snmp-5.7.3/dist/snmptrapd.socket.MPGqYh net-snmp-5.7.3/dist/snmptrapd.socket
|
||||
--- net-snmp-5.7.3/dist/snmptrapd.socket.MPGqYh 2015-02-17 13:34:05.745221844 +0100
|
||||
+++ net-snmp-5.7.3/dist/snmptrapd.socket 2015-02-17 13:34:05.745221844 +0100
|
||||
@@ -0,0 +1,14 @@
|
||||
+[Unit]
|
||||
+Description=Socket listening for SNMP trap messages
|
||||
|
@ -359,9 +358,9 @@ diff -up net-snmp-5.7.2/dist/snmptrapd.socket.systemd net-snmp-5.7.2/dist/snmptr
|
|||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
||||
diff -up net-snmp-5.7.2/include/net-snmp/library/sd-daemon.h.systemd net-snmp-5.7.2/include/net-snmp/library/sd-daemon.h
|
||||
--- net-snmp-5.7.2/include/net-snmp/library/sd-daemon.h.systemd 2012-11-12 10:18:46.106369503 +0100
|
||||
+++ net-snmp-5.7.2/include/net-snmp/library/sd-daemon.h 2012-11-12 10:18:46.106369503 +0100
|
||||
diff -up net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h.MPGqYh net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h
|
||||
--- net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h.MPGqYh 2015-02-17 13:34:05.746221843 +0100
|
||||
+++ net-snmp-5.7.3/include/net-snmp/library/sd-daemon.h 2015-02-17 13:34:05.746221843 +0100
|
||||
@@ -0,0 +1,286 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
|
@ -649,10 +648,10 @@ diff -up net-snmp-5.7.2/include/net-snmp/library/sd-daemon.h.systemd net-snmp-5.
|
|||
+#endif
|
||||
+
|
||||
+#endif /* SNMPD_SD_DAEMON_H */
|
||||
diff -up net-snmp-5.7.2/include/net-snmp/net-snmp-config.h.in.systemd net-snmp-5.7.2/include/net-snmp/net-snmp-config.h.in
|
||||
--- net-snmp-5.7.2/include/net-snmp/net-snmp-config.h.in.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/include/net-snmp/net-snmp-config.h.in 2012-11-12 10:18:46.107369501 +0100
|
||||
@@ -1389,6 +1389,9 @@
|
||||
diff -up net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in.MPGqYh net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in
|
||||
--- net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/include/net-snmp/net-snmp-config.h.in 2015-02-17 13:34:05.746221843 +0100
|
||||
@@ -1410,6 +1410,9 @@
|
||||
/* If you don't have root access don't exit upon kmem errors */
|
||||
#undef NETSNMP_NO_ROOT_ACCESS
|
||||
|
||||
|
@ -662,9 +661,9 @@ diff -up net-snmp-5.7.2/include/net-snmp/net-snmp-config.h.in.systemd net-snmp-5
|
|||
/* Define if you want to remove all SET/write access from the code */
|
||||
#undef NETSNMP_NO_WRITE_SUPPORT
|
||||
|
||||
diff -up net-snmp-5.7.2/README.systemd.systemd net-snmp-5.7.2/README.systemd
|
||||
--- net-snmp-5.7.2/README.systemd.systemd 2012-11-12 10:18:46.108369499 +0100
|
||||
+++ net-snmp-5.7.2/README.systemd 2012-11-12 10:18:46.108369499 +0100
|
||||
diff -up net-snmp-5.7.3/README.systemd.MPGqYh net-snmp-5.7.3/README.systemd
|
||||
--- net-snmp-5.7.3/README.systemd.MPGqYh 2015-02-17 13:34:05.747221843 +0100
|
||||
+++ net-snmp-5.7.3/README.systemd 2015-02-17 13:34:05.747221843 +0100
|
||||
@@ -0,0 +1,41 @@
|
||||
+README.systemd
|
||||
+--------------
|
||||
|
@ -708,9 +707,9 @@ diff -up net-snmp-5.7.2/README.systemd.systemd net-snmp-5.7.2/README.systemd
|
|||
+start during boot and not after first SNMP trap arrives. Same rules as for snmpd
|
||||
+applies then.
|
||||
\ No newline at end of file
|
||||
diff -up net-snmp-5.7.2/snmplib/sd-daemon.c.systemd net-snmp-5.7.2/snmplib/sd-daemon.c
|
||||
--- net-snmp-5.7.2/snmplib/sd-daemon.c.systemd 2012-11-12 10:18:46.109369497 +0100
|
||||
+++ net-snmp-5.7.2/snmplib/sd-daemon.c 2012-11-12 10:18:46.109369497 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/sd-daemon.c.MPGqYh net-snmp-5.7.3/snmplib/sd-daemon.c
|
||||
--- net-snmp-5.7.3/snmplib/sd-daemon.c.MPGqYh 2015-02-17 13:34:05.747221843 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/sd-daemon.c 2015-02-17 13:34:05.747221843 +0100
|
||||
@@ -0,0 +1,532 @@
|
||||
+/*
|
||||
+ * Systemd integration parts.
|
||||
|
@ -1244,9 +1243,9 @@ diff -up net-snmp-5.7.2/snmplib/sd-daemon.c.systemd net-snmp-5.7.2/snmplib/sd-da
|
|||
+}
|
||||
+
|
||||
+#endif /* ! NETSNMP_NO_SYSTEMD */
|
||||
diff -up net-snmp-5.7.2/snmplib/transports/snmpTCPDomain.c.systemd net-snmp-5.7.2/snmplib/transports/snmpTCPDomain.c
|
||||
--- net-snmp-5.7.2/snmplib/transports/snmpTCPDomain.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/snmplib/transports/snmpTCPDomain.c 2012-11-12 10:19:41.767217067 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c
|
||||
--- net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/transports/snmpTCPDomain.c 2015-02-17 13:34:05.748221842 +0100
|
||||
@@ -43,6 +43,10 @@
|
||||
#include <net-snmp/library/snmpTCPBaseDomain.h>
|
||||
#include <net-snmp/library/tools.h>
|
||||
|
@ -1326,9 +1325,9 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpTCPDomain.c.systemd net-snmp-5.7.
|
|||
}
|
||||
|
||||
/*
|
||||
diff -up net-snmp-5.7.2/snmplib/transports/snmpTCPIPv6Domain.c.systemd net-snmp-5.7.2/snmplib/transports/snmpTCPIPv6Domain.c
|
||||
--- net-snmp-5.7.2/snmplib/transports/snmpTCPIPv6Domain.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/snmplib/transports/snmpTCPIPv6Domain.c 2012-11-12 10:20:32.019078971 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c
|
||||
--- net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/transports/snmpTCPIPv6Domain.c 2015-02-17 13:34:05.748221842 +0100
|
||||
@@ -49,6 +49,10 @@
|
||||
#include <net-snmp/library/snmpTCPBaseDomain.h>
|
||||
#include <net-snmp/library/tools.h>
|
||||
|
@ -1409,9 +1408,9 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpTCPIPv6Domain.c.systemd net-snmp-
|
|||
}
|
||||
|
||||
/*
|
||||
diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c
|
||||
--- net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c 2012-11-12 10:22:30.279750750 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c
|
||||
--- net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv4BaseDomain.c 2015-02-17 13:36:22.744123462 +0100
|
||||
@@ -40,6 +40,10 @@
|
||||
|
||||
#include <net-snmp/library/snmpSocketBaseDomain.h>
|
||||
|
@ -1420,10 +1419,10 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd net-s
|
|||
+#include <net-snmp/library/sd-daemon.h>
|
||||
+#endif
|
||||
+
|
||||
#if (defined(linux) && defined(IP_PKTINFO)) \
|
||||
|| defined(IP_RECVDSTADDR) && HAVE_STRUCT_MSGHDR_MSG_CONTROL \
|
||||
&& HAVE_STRUCT_MSGHDR_MSG_FLAGS
|
||||
@@ -67,6 +71,7 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
#if defined(HAVE_IP_PKTINFO) || defined(HAVE_IP_RECVDSTADDR)
|
||||
int netsnmp_udpipv4_recvfrom(int s, void *buf, int len, struct sockaddr *from,
|
||||
socklen_t *fromlen, struct sockaddr *dstip,
|
||||
@@ -64,6 +68,7 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
char *client_socket = NULL;
|
||||
netsnmp_indexed_addr_pair addr_pair;
|
||||
socklen_t local_addr_len;
|
||||
|
@ -1431,7 +1430,7 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd net-s
|
|||
|
||||
#ifdef NETSNMP_NO_LISTEN_SUPPORT
|
||||
if (local)
|
||||
@@ -91,7 +96,20 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
@@ -88,7 +93,20 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
free(str);
|
||||
}
|
||||
|
||||
|
@ -1453,17 +1452,16 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd net-s
|
|||
DEBUGMSGTL(("UDPBase", "openned socket %d as local=%d\n", t->sock, local));
|
||||
if (t->sock < 0) {
|
||||
netsnmp_transport_free(t);
|
||||
@@ -141,13 +159,15 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
DEBUGMSGTL(("netsnmp_udp", "set IP_RECVDSTADDR\n"));
|
||||
@@ -151,12 +169,14 @@ netsnmp_udpipv4base_transport(struct soc
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* !defined(WIN32) */
|
||||
- rc = bind(t->sock, (struct sockaddr *) addr,
|
||||
- sizeof(struct sockaddr));
|
||||
- if (rc != 0) {
|
||||
- netsnmp_socketbase_close(t);
|
||||
- netsnmp_transport_free(t);
|
||||
- return NULL;
|
||||
- }
|
||||
+ if (!socket_initialized) {
|
||||
+ rc = bind(t->sock, (struct sockaddr *) addr,
|
||||
+ sizeof(struct sockaddr));
|
||||
|
@ -1472,13 +1470,12 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv4BaseDomain.c.systemd net-s
|
|||
+ netsnmp_transport_free(t);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
t->data = NULL;
|
||||
t->data_length = 0;
|
||||
#else /* NETSNMP_NO_LISTEN_SUPPORT */
|
||||
diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c.systemd net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c
|
||||
--- net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c 2012-11-12 10:23:19.713603003 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c
|
||||
--- net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/transports/snmpUDPIPv6Domain.c 2015-02-17 13:37:16.256087147 +0100
|
||||
@@ -67,6 +67,10 @@ static const struct in6_addr in6addr_any
|
||||
#include <net-snmp/library/snmpSocketBaseDomain.h>
|
||||
#include <net-snmp/library/tools.h>
|
||||
|
@ -1520,8 +1517,8 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c.systemd net-snmp-
|
|||
netsnmp_transport_free(t);
|
||||
return NULL;
|
||||
@@ -242,13 +259,14 @@ netsnmp_udp6_transport(struct sockaddr_i
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
-
|
||||
- rc = bind(t->sock, (struct sockaddr *) addr,
|
||||
|
@ -1541,9 +1538,9 @@ diff -up net-snmp-5.7.2/snmplib/transports/snmpUDPIPv6Domain.c.systemd net-snmp-
|
|||
}
|
||||
t->local = (unsigned char*)malloc(18);
|
||||
if (t->local == NULL) {
|
||||
diff -up net-snmp-5.7.2/snmplib/transports/snmpUnixDomain.c.systemd net-snmp-5.7.2/snmplib/transports/snmpUnixDomain.c
|
||||
--- net-snmp-5.7.2/snmplib/transports/snmpUnixDomain.c.systemd 2012-10-10 00:28:58.000000000 +0200
|
||||
+++ net-snmp-5.7.2/snmplib/transports/snmpUnixDomain.c 2012-11-12 10:24:02.803466358 +0100
|
||||
diff -up net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c.MPGqYh net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c
|
||||
--- net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c.MPGqYh 2014-12-08 21:23:22.000000000 +0100
|
||||
+++ net-snmp-5.7.3/snmplib/transports/snmpUnixDomain.c 2015-02-17 13:34:05.749221841 +0100
|
||||
@@ -37,6 +37,10 @@
|
||||
#include <net-snmp/library/system.h> /* mkdirhier */
|
||||
#include <net-snmp/library/tools.h>
|
||||
|
|
Loading…
Reference in New Issue