packages/utils/collectd/patches/150-fix-interface-af-link
Hannu Nyman 1b0bd00838 collectd: Update to 5.4.1
-update collectd to the current release 5.4.1
-fix sigrok glib check (upstream patch after 5.4.1)

Note:
Changes are required also to luci-statistics in Luci source.
Patch in http://patchwork.openwrt.org/patch/5303/

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2014-09-09 19:45:14 +03:00

21 lines
633 B
Text

--- a/src/interface.c
+++ b/src/interface.c
@@ -244,8 +244,8 @@ struct net_device_stats {
for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next)
{
- if (if_ptr->ifa_addr != NULL && if_ptr->ifa_addr->sa_family == AF_LINK) {
- if_data = (struct IFA_DATA *) if_ptr->ifa_data;
+ if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL)
+ continue;
if_submit (if_ptr->ifa_name, "if_octets",
if_data->IFA_RX_BYTES,
@@ -256,7 +256,6 @@ struct net_device_stats {
if_submit (if_ptr->ifa_name, "if_errors",
if_data->IFA_RX_ERROR,
if_data->IFA_TX_ERROR);
- }
}
freeifaddrs (if_list);