Commit 343192d1 authored by Karel Zak's avatar Karel Zak Committed by Mike Frysinger

fix statistics with aliased interfaces

For virtual interfaces created using the ifcfg-ethN:X scripts the
ifconfig and netstat -i report statistics of the last real adapter
listed in /proc/dev/net.

URL: https://bugzilla.redhat.com/143981
parent 96225a61
......@@ -364,9 +364,10 @@ static int if_readlist_proc(const char *target)
s = get_name(name, buf);
ife = if_cache_add(name);
get_dev_fields(s, ife);
ife->statistics_valid = 1;
if (target && !strcmp(target,name))
if (target && !strcmp(target,name)) {
ife->statistics_valid = 1;
break;
}
}
if (ferror(fh)) {
perror(_PATH_PROCNET_DEV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment