do_bandwidth = 0;
error("DISABLED: system.ipv4");
} else {
+ iftot.ift_ibytes = iftot.ift_obytes = 0;
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
- iftot.ift_ibytes += (((struct if_data *)ifa->ifa_data)->ifi_ibytes);
- iftot.ift_obytes += (((struct if_data *)ifa->ifa_data)->ifi_obytes);
+ iftot.ift_ibytes += IFA_DATA(ibytes);
+ iftot.ift_obytes += IFA_DATA(obytes);
}
st = rrdset_find("system.ipv4");
// --------------------------------------------------------------------
+ iftot.ift_ibytes = iftot.ift_obytes = 0;
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;