# HG changeset patch # User Charly Abraham # Date 1414150973 25200 # Node ID c5fcac70b13c848f31dc933308f78f29ec343b35 # Parent 9856179cf9f0dc66df796c20296f7110f4179bf9 16003771 net-snmp service records a registration error when service is enabled diff -r 9856179cf9f0 -r c5fcac70b13c components/net-snmp/patches/045.16003771.agent_registry.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/net-snmp/patches/045.16003771.agent_registry.patch Fri Oct 24 04:42:53 2014 -0700 @@ -0,0 +1,33 @@ +This patch taken from the net-snmp community fixes, an issue related to registration +error recorded in the /var/log/snmpd.log file when snmp is enabled. + +The details can be found in the following location +http://sourceforge.net/p/net-snmp/patches/973/ +--- a/agent/agent_registry.c 2012-12-18 02:02:56.032682052 -0800 ++++ b/agent/agent_registry.c 2012-12-18 02:34:11.953844076 -0800 +@@ -532,7 +532,23 @@ + + if (next && (next->namelen == new_sub->namelen) && + (next->priority == new_sub->priority)) { +- netsnmp_assert(!"registration != duplicate"); /* always false */ ++ if (new_sub->namelen != 1) { /* ignore root OID dups */ ++ size_t out_len = 0; ++ size_t buf_len = 0; ++ char *buf = NULL; ++ int buf_overflow = 0; ++ ++ netsnmp_sprint_realloc_objid((u_char **) &buf, &buf_len, &out_len, ++ 1, &buf_overflow, ++ new_sub->start_a, ++ new_sub->start_len); ++ snmp_log(LOG_ERR, ++ "duplicate registration: MIB modules %s and %s (oid %s%s).\n", ++ next->label_a, new_sub->label_a, ++ buf ? buf : "", ++ buf_overflow ? " [TRUNCATED]" : ""); ++ free(buf); ++ } + return MIB_DUPLICATE_REGISTRATION; + } + +