Mike, Thank you for the quick response.
I tried different string value on both browsers, they have the same problem.
net-snmp's snmpset -V 2C (snmp v2) have the same problem too.
But snmpset -V 3 (snmp V3) does not have the problem.
I used another browser (besides the above two) which allow me to use SNMP V3, 
the problem goes away.
If the agent code has problem, why it works with V3?
Thanks
Chi

-----Original Message-----
From: Mike Ayers [mailto:[email protected]] 
Sent: Thursday, January 14, 2010 4:11 PM
To: Guan, Chi @ Datron; [email protected]
Subject: RE: net-snmp agent error when set from a MIB browser

> From: [email protected] [mailto:[email protected]]
> Sent: Thursday, January 14, 2010 4:00 PM


> I wrote a agent in net-snmp and use commercial MIB browser (iReasoning
> and MG-soft) to talk to it.
> 
> I try to set values to different OID.  When I use snmpset of net-snmp,
> it works fine, but when I use the MIB browser, the values was wrong.
> 
> 1.      I set an octets string  value “12345”  in OID:
> 1.3.6.1.4.1.3231.101.4.1.102.1.0,  the agent get the correct value
> “12345”.
> 
> 2.      I set another  octets string  value “67” in the same OID, the
> agent did not get “67”, instead it got “67345”.

        You tried both these steps, in order, for both browsers, correct?

        Try pointing that browser at a different string value and changing it 
to something shorter.  Seems to me it isn't managing its buffers correctly.  If 
the different string (make sure it isn't vital!) has similar problems, then 
your browser is at fault.  Otherwise, it's your code - are you perhaps not 
properly terminating the string?


        HTH,

Mike

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-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

Reply via email to