Re: Problem using net-snmp as subagent (Error in packet)

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 02/02/07, Johnny Ljunggren <[email protected]> wrote:
> I've made a master AgentX (using agentpp) that uses net-snmp as subagent
> to provide mib-II information. I get a general failure if I try to get
> some of the OIDs.

I did some more research and found that only the OIDs defined as OID:
SNMPv2-SMI::zeroDotZero will give this error.
ie. IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero


> My agentx outputs this:
> 20070202.22:25:53: 567: (1)ERROR  : MasterAgentXMib: invalid AgentX response
> (sd)(sid)(tid)(req-vbs)(resp-vbs): (15), (1), (96), (1), (0)


I've done a bit of poking about, and suspect that the Net-SNMP subagent may
be returning an invalid encoding of .0.0 within the AgentX packet.

Can you please try the enclosed patch, and see if it makes any difference.

Dave
===--- cut here ---===
--- agent/mibgroup/agentx/protocol.c    15 Sep 2006 00:48:39 -0000      5.8
+++ agent/mibgroup/agentx/protocol.c    5 Feb 2007 11:43:18 -0000
@@ -228,6 +228,7 @@

     if (name_len == 2 && (name[0] == 0 && name[1] == 0)) {
         name_len = 0;           /* Null OID */
+        inclusive = 0;
     }

     /*

-------------------------------------------------------------------------
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.