summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7567040)
raw | patch | inline | side by side (parent: 7567040)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 15 Sep 2007 10:30:15 +0000 (12:30 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 15 Sep 2007 10:30:15 +0000 (12:30 +0200) |
Hopefully this fixes problems on my WRT ;)
src/netlink.c | patch | blob | history |
diff --git a/src/netlink.c b/src/netlink.c
index 8c883f67179a9525d71dc0a1a04b11dbb9a3a1bd..22afdc77f9a1701e8763207efe8bf1391c2c683e 100644 (file)
--- a/src/netlink.c
+++ b/src/netlink.c
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);