1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 04:44:10 +02:00
openwrt-packages/net/net-snmp/patches/100-debian-statistics.patch

14 lines
425 B
Diff
Raw Normal View History

--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
@@ -1586,6 +1586,10 @@ Interface_Scan_Init(void)
char *stats, *ifstart = line;
size_t len;
+ /* Ignore interfaces with no statistics. */
+ if (strstr(line, "No statistics available."))
+ continue;
+
len = strlen(line);
if (len && line[len - 1] == '\n')
line[len - 1] = '\0';