Re: unregister_mib fails
Pal Saint <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAJX137ooJ9SCvvmDK2cp=47nzGCR44YaOvD1iLbZPsDAmKgNHQ@mail.gmail.com> |
unregister_mib fails even for standard UCD-DLMOD MIB. While registering all the columns are explicitly registered. But during unregistering, unregister_mib tries to do an exact match with the root oid to the subtree children that were registered. This seems to fail. Checking if unregister_mib_range might help. Could someone comment if you have experience in this area? Thanks On Fri, Mar 8, 2013 at 12:09 PM, Pal Saint <[email protected]> wrote: > I added additional debugging to 'agent_registry.c' file and recompiled. > During unregistering the MIB, the agent complaints about not finding the > child and returns MIB_NO_SUCH_REGISTRATION. > > My subagents registers MIB using default context ("") and default > priority. Any idea why the registering succeeds but not unregistering MIB? > I appreciate your insights and pointers. > > 1695 while(unregistering){ > 1696 DEBUGMSGTL(("register_mib", "unregistering ")); > 1697 DEBUGMSGOIDRANGE(("register_mib", name, len, range_subid, > range_ubound)); > 1698 DEBUGMSG(("register_mib", "\n")); > 1699 > 1700 list = netsnmp_subtree_find(name, len, > netsnmp_subtree_find_first(context), > 1701 context); > 1702 if (list == NULL) { > 1703 DEBUGMSGTL(("register_mib", "pal:failed to find > subtree")); > 1704 return MIB_NO_SUCH_REGISTRATION; > 1705 } > 1706 > 1707 for (child = list, prev = NULL; child != NULL; > 1708 prev = child, child = child->children) { > 1709 if (netsnmp_oid_equals(child->name_a, child->namelen, > name, len) == 0 && > 1710 child->priority == priority) { > 1711 break; /* found it */ > 1712 } > 1713 } > 1714 > 1715 if (child == NULL) { > 1716 DEBUGMSGTL(("register_mib", "pal:failed null child")); > <<<<<<<<<<<< Returns from here > 1717 return MIB_NO_SUCH_REGISTRATION; > 1718 } > > > > On Thu, Mar 7, 2013 at 1:22 AM, Pal Saint <[email protected]> wrote: > >> All, >> >> We use REGISTER_MIB() to register our MIB tables, and use >> unregister_mib() for unregistering them. However, when SIGHUP is sent to >> snmpd, it fails to unregister the MIB variables. It fails with >> "MIB_NO_SUCH_REGISTRATION". Registering and unregistering code is actually >> created by mib2c.old_api code generation configuration. Let me know if you >> need more information. >> >> Here is snmpd debug info... >> >> dlmod: dlmod_create_module >> dlmod: dlmod_load_module exampleTable: /usr/lib/snmp/dlmod/exampleTable.so >> ................. Registering exampleTable >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.1 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.2 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.3 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.4 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.5 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.6 with context "" >> register_mib: registering "exampleTable" at >> SNMPv2-SMI::enterprises.8075.1.3.2.1.7 with context "" >> >> ... >> dlmod: Calling deinit_exampleTable() >> deinit_exampleTable: unregistering exampleTable... >> register_mib: unregistering SNMPv2-SMI::enterprises.8075.1.3.2 >> deinit_exampleTable: unregistering exampleTable failed:-1 >> dlmod: Module exampleTable unloaded >> >> > ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users