From 8389245e81b204764b44a00204adfa5804c10062 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Sun, 26 Jul 2015 15:01:59 +0300 Subject: [PATCH] ifpps: Fix panic when dev name contains "_" Add match device name with "_" in /proc/net/dev. Signed-off-by: Vadim Kochan Signed-off-by: Daniel Borkmann --- ifpps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifpps.c b/ifpps.c index e70e8a61..2d64849c 100644 --- a/ifpps.c +++ b/ifpps.c @@ -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, -- 2.11.4.GIT