Robert Story wrote:
On Mon, 23 Jan 2006 16:17:38 +0100 Radek wrote:
RV> The override statement doesn't work in net-snmp-5.1.2/5.1.3
RV> If I add the following line into snmpd.conf
RV> RV> override 1.3.6.1.2.1.25.2.3.1.3.6 null RV> RV> I can still access the MIB
Confirmed with 5.1.4.dev cvs branch. I get an error (oid registration failed
within the agent) during startup. Can you file a bug report please?

Have you checked 5.2.x?


This seems to be fixed in 5.2 and 5.3. Also I've experienced a crash in 5.1.2 when using NULL string in override option. The attached patch fixies the crash (and I think sth similar is already in 5.1.4cvs) but doesn't fix the override option. I'll open a bug also.

Radek


--- net-snmp-5.1.2/agent/agent_registry.c.orig	2005-12-28 14:29:41.000000000 +0000
+++ net-snmp-5.1.2/agent/agent_registry.c	2005-12-28 14:41:32.000000000 +0000
@@ -568,7 +568,9 @@ netsnmp_register_mib(const char *moduleN
     subtree->name_a  = snmp_duplicate_objid(mibloc, mibloclen);
     subtree->start_a = snmp_duplicate_objid(mibloc, mibloclen);
     subtree->end_a   = snmp_duplicate_objid(mibloc, mibloclen);
-    subtree->label_a = strdup(moduleName);
+    if (moduleName != NULL) {
+        subtree->label_a = strdup(moduleName);
+    }
     if (subtree->name_a == NULL || subtree->start_a == NULL || 
 	subtree->end_a  == NULL || subtree->label_a == NULL) {
 	netsnmp_subtree_free(subtree);

Reply via email to