openwrt-packages/net/net-snmp/patches/100-debian-statistics.patch

14 lines
425 B
Diff

--- 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';