return (-1);
}
- if (attrs[IFLA_STATS] == NULL)
- return (-1);
- stats = RTA_DATA (attrs[IFLA_STATS]);
-
if (attrs[IFLA_IFNAME] == NULL)
{
ERROR ("netlink plugin: link_filter: attrs[IFLA_IFNAME] == NULL");
iflist[msg->ifi_index] = strdup (dev);
}
+ if (attrs[IFLA_STATS] == NULL)
+ {
+ DEBUG ("netlink plugin: link_filter: No statistics for interface %s.", dev);
+ return (0);
+ }
+ stats = RTA_DATA (attrs[IFLA_STATS]);
+
if (check_ignorelist (dev, "interface", NULL) == 0)
{
submit_two (dev, "if_octets", NULL, stats->rx_bytes, stats->tx_bytes);