Blame SOURCES/net-snmp-5.8-flood-messages.patch

b40531
From cd09fd82522861830aaf9d237b26eef5f9ba50d2 Mon Sep 17 00:00:00 2001
b40531
From: Bart Van Assche <bvanassche@acm.org>
b40531
Date: Wed, 21 Nov 2018 20:47:42 -0800
b40531
Subject: [PATCH] MIB-II: Only log once that opening /proc/net/if_inet6 failed
b40531
b40531
If IPv6 has been disabled (ipv6.disable=1) then opening /proc/net/if_inet6
b40531
fails. Only log this once instead of thousand of times a day.
b40531
b40531
Reported-by: Fif <lefif@users.sourceforge.net>
b40531
---
b40531
 agent/mibgroup/ip-mib/data_access/ipaddress_linux.c | 2 +-
b40531
 1 file changed, 1 insertion(+), 1 deletion(-)
b40531
b40531
diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
b40531
index 5ddead3e0..280575ce3 100644
b40531
--- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
b40531
+++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
b40531
@@ -234,7 +234,7 @@ _load_v6(netsnmp_container *container, int idx_offset)
b40531
b40531
 #define PROCFILE "/proc/net/if_inet6"
b40531
     if (!(in = fopen(PROCFILE, "r"))) {
b40531
-        snmp_log_perror("ipaddress_linux: could not open " PROCFILE);
b40531
+        NETSNMP_LOGONCE((LOG_ERR, "ipaddress_linux: could not open " PROCFILE));
b40531
         return -2;
b40531
     }
b40531