packages/net/net-snmp/patches/100-debian-statistics.patch
Stijn Tintel 4cdbe799b1 net-snmp: bump to 5.9
Neither the configure option nor configure variable to disable linking
against PCRE seem to work anymore, so simply drop both and add a
dependency on libpcre. As net-snmp is unlikely to fit on devices with
small flash anyway, the extra size requirement shouldn't be a problem.
If it is, feel free to submit a patch to fix the broken upstream
behaviour.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-03-17 21:53:10 +02:00

22 lines
843 B
Diff

--- a/agent/mibgroup/mibII/interfaces.c
+++ b/agent/mibgroup/mibII/interfaces.c
@@ -1579,6 +1579,10 @@ Interface_Scan_Init(void)
struct ifnet *nnew;
char *stats, *ifstart = line;
+ /* Ignore interfaces with no statistics. */
+ if (strstr(line, "No statistics available."))
+ continue;
+
if (line[strlen(line) - 1] == '\n')
line[strlen(line) - 1] = '\0';
@@ -1611,7 +1615,7 @@ Interface_Scan_Init(void)
&coll) != 5)) {
if ((scan_line_to_use == scan_line_2_2)
&& !strstr(line, "No statistics available"))
- snmp_log(LOG_ERR,
+ snmp_log(LOG_DEBUG,
"/proc/net/dev data format error, line ==|%s|",
line);
continue;