summaryrefslogtreecommitdiff
path: root/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-13 17:26:47 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-13 17:27:13 +0100
commit1ee30e3c419824f45dc52d67516274548548b574 (patch)
tree1236b86768cd24425234fb99486ed342c5d427fb /package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c
parentd512d21dc70b6ab7151b43c0e302255434260d32 (diff)
update to Linux Kernel 2.6.37
Diffstat (limited to 'package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c')
-rw-r--r--package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c
new file mode 100644
index 000000000..f0be57e78
--- /dev/null
+++ b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c
@@ -0,0 +1,48 @@
+--- net-snmp-5.6.1.orig/agent/mibgroup/mibII/tcpTable.c 2010-10-20 15:12:08.000000000 +0200
++++ net-snmp-5.6.1/agent/mibgroup/mibII/tcpTable.c 2011-01-12 14:48:14.000000000 +0100
+@@ -33,6 +33,12 @@
+ #include <netlink/netlink.h>
+ #include <netlink/msg.h>
+ #include <linux/inet_diag.h>
++
++/* libnl 2.0 compatibility code */
++#define nl_handle nl_sock
++#define nl_handle_alloc nl_socket_alloc
++#define nl_handle_alloc_cb nl_socket_alloc_cb
++#define nl_handle_destroy nl_socket_free
+ #endif
+
+ #include <net-snmp/net-snmp-includes.h>
+@@ -565,8 +571,8 @@ tcpTable_load_netlink(void)
+ }
+
+ 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());
++ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(1)));
++ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(1));
+ nl_handle_destroy(nl);
+ return -1;
+ }
+@@ -580,8 +586,8 @@ tcpTable_load_netlink(void)
+ 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());
++ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(1)));
++ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(1));
+ nl_handle_destroy(nl);
+ return -1;
+ }
+@@ -593,8 +599,8 @@ tcpTable_load_netlink(void)
+
+ 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());
++ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(1)));
++ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(1));
+ nl_handle_destroy(nl);
+ return -1;
+ }