When the parent_data is NULL, which indicates there is no table entry for this request, and then usually, they will call "netsnmp_set_request_error(reqinfo, request,SNMP_NOSUCHINSTANCE)" to set the VB type to "NO SUCH INSTANCE" in your Table Handler function - please check your private table handler code.
Also, you need to call netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT) to set the VB type to "NO SUCH OBJECT" in your Table Handler function, when the column is out of range. Thanks, Ming From: Jaka Simonic <jaka.simo...@aviatnet.com> Sent: Thursday, May 16, 2019 6:15 AM To: net-snmp-coders@lists.sourceforge.net Subject: snmpa agent get_next bad oid combination Hi! We are using version 5.7.3 on an embedded system. We noticed segmentation errors in our dynamically loded module. The issue was that one of the requests had null pointer at parent_data. The issue can be reproduced on any table i.e. >snmpgetnext -v2c -c public x.x.x.x 1.3.6.1.4.1.2509.9.15.2.3.1.13 >1.3.6.1.4.1.2509.9.15.2.3.1.12< (the first oid is pointing at nonexistent >"column" and second one is a valid oid). The nonexistent oid appears in the >requests linked list as a request with parent_data null and processed with >value 1. (gdb) x/64xb 0x1e733f8 0xbb45b8: 0xd8 0xf9 0xbf 0x00 0x00 0x00 0x00 0x00 0xbb45c0: 0xb8 0xb1 0x9f 0x00 0x10 0xe3 0xad 0x00 0xbb45c8: 0x09 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xbb45d0: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xbb45d8: 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0xbb45e0: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xbb45e8: 0xd8 0xf9 0xbf 0x00 0xf8 0x45 0xbb 0x00 0xbb45f0: 0x00 0x00 0x00 0x00 0x60 0xe2 0xad 0x00 Usually getnext on a >nonexistent column< oid returns >No Such Object available...< without calling our linked module. Is this a bug? Can you please adivse me how to handle this situation when encountered? Best regards, Jaka Simonic p.s. this should give additional clarification This only happens when oids are pointing at the same table and one of them is pointing at nonexistent column and another at an existing column. Otherwise the agent resolves the situation with appropriate messages. Here all of oid are nonexistent: snmpgetnext -v2c -c public x.x.x.x iso.3.6.1.4.1.2509.9.15.2.3.1.14.59.2001.1.5 iso.3.6.1.4.1.2509.9.15.2.3.1.14.59.2001.1.7 1.0.8802.1.1.2.1.4.1.1.91.0.8802.1.1.2.1.4.1.1.8 iso.3.6.1.4.1.2509.9.15.2.3.1.14.59.2001.1.5 = No Such Object available on this agent at this OID iso.3.6.1.4.1.2509.9.15.2.3.1.14.59.2001.1.7 = No Such Object available on this agent at this OID iso.0.8802.1.1.2.1.4.1.1.91.0.8802.1.1.2.1.4.1.1.8 = No Such Object available on this agent at this OID
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders