snmpd/agentx return error and multi varbind

"Naylor, Mark" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <61C61BB7D4828E4EB72B065C85E3D8A60F5109@szexchange.schmid-telecom.com>
Hello,

I have been developing a net-snmp based AgentX application recently 
for some enterprise MIBS. While testing the AgentX subagent the 
following feature was discovered. It appears not to conform to the 
snmp standards. I will explain further below.

Take a simple snmpset command to set SNMPv2-MIB::sysContact.0:

  snmpset -M . -c private -v 1 192.168.248.157 1.3.6.1.2.1.1.4.0 \
                        s "Mark Naylor, Schmid Telecom AG, Zurich" 
  iso.3.6.1.2.1.1.4.0 = STRING: "Mark Naylor, Schmid Telecom AG, Zurich"

This works fine. Now add a second deliberately bad OID

  snmpset -M . -c private -v 1 192.168.248.157 1.3.6.1.2.1.1.4.0 s \
                          "Mark Naylor, Schmid Telecom AG, Zurich" \
                          1.3.6.1.4.211.346.5785 i 1
  Error in packet.
  Reason: (noSuchName) There is no such variable name in this MIB.
  Failed object: iso.3.6.1.4.211.346.5785

An error message comes back, this is correct. Next I made a very simple 
AgentX subagent based on the scalar example 
http://www.net-snmp.org/dev/agent/scalar__int_8c-example.html
which has the OID 1.3.6.1.4.1.8072.2.1.1.0

If you compile and run the scalar AgentX program and repeate the snmpset

command above (with the bad OID) you get the same result again. This
is correct.

However, once you add the example scalar OID into the snmpset command, 
(so there is communication to the subagent) the bad OID value seems to 
be accepted by snmpd!!??

 snmpset -M . -c private -v 1 192.168.248.157 1.3.6.1.2.1.1.4.0 \  
                     s "Mark Naylor, Schmid Telecom AG, Zurich" \
                                   1.3.6.1.4.1.8072.2.1.1.0 i 2 \  
                                   1.3.6.1.4.211.346.5785 i 1  
 iso.3.6.1.2.1.1.4.0 = STRING: "Mark Naylor, Schmid Telecom AG, Zurich"

 iso.3.6.1.4.1.8072.2.1.1.0 = INTEGER: 2  
 iso.3.6.1.4.211.346.5785 = INTEGER: 1

The snmpget always seems to work OK, if a bad OID it given it 
recognises this, there seems to be no problem with snmpget.

What is your opinion on this? I am working with 5.3.0.1, but also tried 
5.3.1 quickly, the result is the same. I compile for a PPC405EP 
processor with the ELDK3.0 using the config options

configure --host=powerpc-unknown-linux-gnu --with-endianness=big \
  CC="ppc_4xx-gcc" CPP="ppc_4xx-gcc -E" LD="ppc_4xx-ld"

thanks & regards

  Mark Naylor

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.