From 17ea1053cc71feca63004318aeb7deaa0a99b5c4 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Sat, 1 Feb 2020 14:19:20 +0100 Subject: ifpps: fix iface stat parsing if uppercase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linux netdev can contain uppercase characters. Signed-off-by: Benoît Ganne Signed-off-by: Tobias Klauser --- ifpps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ifpps.c b/ifpps.c index 501fa50..3c98643 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-zA-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, -- cgit v1.2.3-54-g00ecf