]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- rel 3; port to libnl 3.0 api auto/th/net-snmp-5_6_1-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 27 Mar 2011 21:12:35 +0000 (21:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-libnl.patch -> 1.1
    net-snmp.spec -> 1.174

net-snmp-libnl.patch [new file with mode: 0644]
net-snmp.spec

diff --git a/net-snmp-libnl.patch b/net-snmp-libnl.patch
new file mode 100644 (file)
index 0000000..3470458
--- /dev/null
@@ -0,0 +1,65 @@
+--- net-snmp-5.6.1/agent/mibgroup/mibII/tcpTable.c.org 2011-03-27 22:39:13.428728506 +0200
++++ net-snmp-5.6.1/agent/mibgroup/mibII/tcpTable.c     2011-03-27 22:39:47.606956561 +0200
+@@ -555,8 +555,9 @@
+ static int
+ tcpTable_load_netlink(void)
+ {
++      int err;
+       /*  TODO: perhaps use permanent nl handle? */
+-      struct nl_handle *nl = nl_handle_alloc();
++      struct nl_sock *nl = nl_socket_alloc();
+       if (nl == NULL) {
+               DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n"));
+@@ -564,10 +565,10 @@
+               return -1;
+       }
+-      if (nl_connect(nl, NETLINK_INET_DIAG) < 0) {
+-              DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror()));
+-              snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror());
+-              nl_handle_destroy(nl);
++      if ((err = nl_connect(nl, NETLINK_INET_DIAG)) < 0) {
++              DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err)));
++              snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err));
++              nl_close(nl);
+               return -1;
+       }
+@@ -579,10 +580,10 @@
+       struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
+       nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0);
+-      if (nl_send_auto_complete(nl, nm) < 0) {
+-              DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror()));
+-              snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror());
+-              nl_handle_destroy(nl);
++      if ((err = nl_send_auto_complete(nl, nm)) < 0) {
++              DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err)));
++              snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err));
++              nl_close(nl);
+               return -1;
+       }
+       nlmsg_free(nm);
+@@ -593,9 +594,9 @@
+       while (running) {
+               if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) {
+-                      DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror()));
+-                      snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror());
+-                      nl_handle_destroy(nl);
++                      DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len)));
++                      snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len));
++                      nl_close(nl);
+                       return -1;
+               }
+@@ -644,7 +645,7 @@
+               free(buf);
+       }
+-      nl_handle_destroy(nl);
++      nl_close(nl);
+       if (tcp_head) {
+               DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n"));
index 6cc65a5d2d42648faaa03c3856634ef0f8aabb6d..4885895ca6e739d6f2716a81367ff03f383b4fbb 100644 (file)
@@ -28,7 +28,7 @@ Summary(ru.UTF-8):    Набор утилит для протокола SNMP от U
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
 Version:       5.6.1
-Release:       2
+Release:       3
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -55,12 +55,13 @@ Patch10:    %{name}-lvalue.patch
 Patch11:       %{name}-defaultconfig.patch
 Patch12:       %{name}-use-rpm-hrmib.patch
 Patch13:       %{name}-TCP_STATS_CACHE_TIMEOUT.patch
+Patch14:       %{name}-libnl.patch
 URL:           http://www.net-snmp.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake
 BuildRequires: elfutils-devel
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
-BuildRequires: libnl-devel >= 1:1.1
+BuildRequires: libnl-devel >= 1:3.0
 BuildRequires: libtool >= 1.4
 BuildRequires: libwrap-devel
 %{?with_lm_sensors:BuildRequires:      lm_sensors-devel >= 3.0.1}
@@ -429,6 +430,7 @@ SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 %build
 %{__libtoolize}
This page took 0.035792 seconds and 4 git commands to generate.