Auto-Merge pull request #2522 from mfournier/fix-collectd-5.8-build
authorcollectd bot <32910397+collectd-bot@users.noreply.github.com>
Mon, 6 Nov 2017 22:04:51 +0000 (23:04 +0100)
committerGitHub <noreply@github.com>
Mon, 6 Nov 2017 22:04:51 +0000 (23:04 +0100)
Automatically merged due to "Automerge" label

contrib/redhat/collectd.spec
src/netlink.c

index 7862663..d84b457 100644 (file)
 %define with_snmp_agent 0%{!?_without_snmp_agent:1}
 %define with_statsd 0%{!?_without_statsd:1}
 %define with_swap 0%{!?_without_swap:1}
+%define with_synproxy 0%{!?_without_synproxy:0}
 %define with_syslog 0%{!?_without_syslog:1}
 %define with_table 0%{!?_without_table:1}
 %define with_tail 0%{!?_without_tail:1}
 Summary:       Statistics collection and monitoring daemon
 Name:          collectd
 Version:       5.7.1
-Release:       7%{?dist}
+Release:       8%{?dist}
 URL:           https://collectd.org
 Source:                https://collectd.org/files/%{name}-%{version}.tar.bz2
 License:       GPLv2
@@ -1655,6 +1656,12 @@ Collectd utilities
 %define _with_swap --disable-swap
 %endif
 
+%if %{with_synproxy}
+%define _with_synproxy --enable-synproxy
+%else
+%define _with_synproxy --disable-synproxy
+%endif
+
 %if %{with_syslog}
 %define _with_syslog --enable-syslog
 %else
@@ -1986,6 +1993,7 @@ Collectd utilities
        %{?_with_snmp_agent} \
        %{?_with_statsd} \
        %{?_with_swap} \
+       %{?_with_synproxy} \
        %{?_with_syslog} \
        %{?_with_table} \
        %{?_with_tail_csv} \
@@ -2291,6 +2299,9 @@ fi
 %if %{with_swap}
 %{_libdir}/%{name}/swap.so
 %endif
+%if %{with_synproxy}
+%{_libdir}/%{name}/synproxy.so
+%endif
 %if %{with_syslog}
 %{_libdir}/%{name}/syslog.so
 %endif
@@ -2367,6 +2378,9 @@ fi
 %{_includedir}/collectd/network_buffer.h
 %{_includedir}/collectd/lcc_features.h
 %{_libdir}/pkgconfig/libcollectdclient.pc
+%{_includedir}/collectd/network_parse.h
+%{_includedir}/collectd/server.h
+%{_includedir}/collectd/types.h
 %{_libdir}/libcollectdclient.so
 
 %files -n libcollectdclient
@@ -2723,6 +2737,12 @@ fi
 %doc contrib/
 
 %changelog
+* Thu Sep 28 2017 xakru <calvinxakru@gmail.com> - 5.7.1-8
+- Add new libcollectdclient/network_parse
+- Add new libcollectdclient/server
+- Add new libcollectdclient/types
+- Add new synproxy plugin
+
 * Fri Aug 18 2017 Ruben Kerkhof <ruben@rubenkerkhof.com> - 5.7.1-7
 - Add new intel_pmu plugin
 
index 0bac3e7..b5ae3bd 100644 (file)
@@ -358,8 +358,10 @@ static int link_filter_cb(const struct nlmsghdr *nlh,
       continue;
 
     if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*stats.stats64)) < 0) {
+      char errbuf[1024];
       ERROR("netlink plugin: link_filter_cb: IFLA_STATS64 mnl_attr_validate2 "
-            "failed.");
+            "failed: %s",
+            sstrerror(errno, errbuf, sizeof(errbuf)));
       return MNL_CB_ERROR;
     }
     stats.stats64 = mnl_attr_get_payload(attr);
@@ -374,8 +376,10 @@ static int link_filter_cb(const struct nlmsghdr *nlh,
       continue;
 
     if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*stats.stats32)) < 0) {
+      char errbuf[1024];
       ERROR("netlink plugin: link_filter_cb: IFLA_STATS mnl_attr_validate2 "
-            "failed.");
+            "failed: %s",
+            sstrerror(errno, errbuf, sizeof(errbuf)));
       return MNL_CB_ERROR;
     }
     stats.stats32 = mnl_attr_get_payload(attr);
@@ -400,8 +404,10 @@ static int qos_attr_cb(const struct nlattr *attr, void *data) {
 
   if (mnl_attr_get_type(attr) == TCA_STATS_BASIC) {
     if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*q_stats->bs)) < 0) {
+      char errbuf[1024];
       ERROR("netlink plugin: qos_attr_cb: TCA_STATS_BASIC mnl_attr_validate2 "
-            "failed.");
+            "failed: %s",
+            sstrerror(errno, errbuf, sizeof(errbuf)));
       return MNL_CB_ERROR;
     }
     q_stats->bs = mnl_attr_get_payload(attr);
@@ -550,8 +556,10 @@ static int qos_filter_cb(const struct nlmsghdr *nlh, void *args) {
       continue;
 
     if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*ts)) < 0) {
+      char errbuf[1024];
       ERROR("netlink plugin: qos_filter_cb: TCA_STATS mnl_attr_validate2 "
-            "failed.");
+            "failed: %s",
+            sstrerror(errno, errbuf, sizeof(errbuf)));
       return MNL_CB_ERROR;
     }
     ts = mnl_attr_get_payload(attr);
@@ -686,8 +694,10 @@ static int ir_read(void) {
     ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
   }
   if (ret < 0) {
-    ERROR("netlink plugin: ir_read: mnl_socket_recvfrom failed.");
-    return -1;
+    char errbuf[1024];
+    ERROR("netlink plugin: ir_read: mnl_socket_recvfrom failed: %s",
+          sstrerror(errno, errbuf, sizeof(errbuf)));
+    return (-1);
   }
 
   /* `link_filter_cb' will update `iflist' which is used here to iterate
@@ -731,10 +741,11 @@ static int ir_read(void) {
         ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
       }
       if (ret < 0) {
-        ERROR("netlink plugin: ir_read:mnl_socket_recvfrom failed.");
+        char errbuf[1024];
+        ERROR("netlink plugin: ir_read: mnl_socket_recvfrom failed: %s",
+              sstrerror(errno, errbuf, sizeof(errbuf)));
         continue;
       }
-
     } /* for (type_index) */
   }   /* for (if_index) */