blob: 1d05728576e948c91cc72db698c8235652a1d9c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Index: net-snmp-5.4.3/agent/mibgroup/mibII/interfaces.c
===================================================================
--- net-snmp-5.4.3.orig/agent/mibgroup/mibII/interfaces.c 2010-06-04 17:10:29.000000000 +0200
+++ net-snmp-5.4.3/agent/mibgroup/mibII/interfaces.c 2010-06-04 17:10:33.000000000 +0200
@@ -1551,6 +1551,10 @@
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';
@@ -1584,7 +1588,7 @@
&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;
|