blob: 5a1562c6f04943636e9a190e5211f39b2edda710 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Description: Ignore interfaces without statistics
Author: Net-SNMP Packaging Team <pkg-net-snmp-devel@lists.alioth.debian.org>
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2023-08-19
--- 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';
|