X-Git-Url: http://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=parseiptables.c;fp=parseiptables.c;h=b44c7ad133008b5275d3e128449a0ff40d752deb;hp=5a2043f714f55025d92cc300b937f830baee59f8;hb=7449b3ede09ef8690b073f73d7732e0e9d532090;hpb=139fc8a0a7c49580783fb3c4b8050761e8bf021a diff --git a/parseiptables.c b/parseiptables.c index 5a2043f..b44c7ad 100644 --- a/parseiptables.c +++ b/parseiptables.c @@ -81,10 +81,6 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) else { sscanf(ptr,"%Lu",&traffic); - if(traffic) - { - traffic_detected = 1; - } traffic += (1<<19); traffic >>= 20; } @@ -157,6 +153,7 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) printf("(down) "); } + traffic_detected = 1; printf("%s %Lu MB (%ld pkts)\n", ipaddr, traffic, pkts); if_exists(ip, ips, eqi(ip->addr,ipaddr));