Hi,
I'm using net-snmp-5.6.rc1, and I just encontered a strange behavior while
issuing multiple snmpset on octet string oids.
I have an oid that holds an octet string. When my module is initialized, the
contents of the oid is initialized to "private".
Then, I issue an snmpget to check if initialization was done correctly.
snmpget -v1 -cprivate localhost myoid.0
it responds with "private", which it is ok,
Then, I issue an snmpset and modify the contents to a strlen less than
'private' (7).
snmpset does it right the first time, but consecutives calls to snmpset, gives
me the remainder of 'private'
for example;
snmpset -v1 -cprivate localhost myoid.0 s "leo"
it responded that myoid.0 is set to "leo" successfully,
but when I do an snmpget, the value is "leovate"
I used DEBUGMSGTL to track the len of requests->requestvb->val.string, and it
shows me that for snmpset to "leo", the strlen is still 7 instead of 3. I'm
suspecting that somehow requests->requestvb->val.string is keeping the previous
contents, and it is overwritting them with new ones, leaving the trails of old
contents.
I also made sure that I've clear my buffer using
memset(_myoid, '\0', _myoid_len);
and still happening.
Is this a bug? or I'm doing something wrong?
Thanks!
Leo;
I issue the first snmpset like so;
snmpset -v1 -cprivate localhost myoid.0 s "leo"
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-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