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

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