packages/libs/net-snmp/patches/100-debian-statistics.patch
acinonyx 392c95443d [packages] net-snmp: Update to v5.4.2.1
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16591 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-27 21:43:45 +00:00

23 lines
822 B
Diff

--- net-snmp-5.1.2.orig/agent/mibgroup/mibII/interfaces.c
+++ net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c
@@ -1598,6 +1612,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';
@@ -1631,7 +1649,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;