diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-07-26 15:01:59 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2015-07-26 20:35:39 +0200 |
commit | 8389245e81b204764b44a00204adfa5804c10062 (patch) | |
tree | e34f8a2feaf5cc41700499e6d1185d1822e625e0 /ifpps.c | |
parent | 3368297312366e2a51a7f87d2c9e645692408041 (diff) |
ifpps: Fix panic when dev name contains "_"
Add match device name with "_" in /proc/net/dev.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'ifpps.c')
-rw-r--r-- | ifpps.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -245,7 +245,7 @@ static int stats_proc_net_dev(const char *ifname, struct ifstat *stats) if (strstr(buff, ifname_colon) == NULL) continue; - if (sscanf(buff, "%*[a-z0-9 .-]:%llu%llu%llu%llu%llu%llu" + if (sscanf(buff, "%*[a-z0-9_ .-]:%llu%llu%llu%llu%llu%llu" "%llu%*u%llu%llu%llu%llu%llu%llu%llu", &stats->rx_bytes, &stats->rx_packets, &stats->rx_errors, &stats->rx_drops, |