On 20 December 2011 20:13, Ravi Kumar <[email protected]> wrote:
> I have an unsigned object defined in mib as given below.
>
>
> testObj  OBJECT-TYPE
>  SYNTAX                  Unsigned32 (1..4294967295)
>  MAX-ACCESS      read-create
>  STATUS                  current
>  DESCRIPTION     " "
>
>
> When I perform set operation on this with a value beyond its range
> it's value gets truncated.
>
> # snmpset  -c public localhost   testObj   u  4294967297
> truncating integer value > 32 bits

My suspicion is that this is being done *before* the request is being
sent to the agent.   So nothing that you do on the agent side will
make any difference to this behaviour.

You can check this by adding the '-d' option to the snmpset command.
Does the "truncating integer value" message appear before or after
the dump of the raw packets?

Also, remember the SNMP specification explicitly restricts integer
values (other than Counter64) to a maximum of 32-bits.   So it
simply isn't possible to send a value such as 4294967297
via a SET command.
   So again, the agent would never see this request.


Now you could certainly argue that perhaps the library should
reject a 32-bit value out of hand, rather than truncating it.
But this would need to be handled within the library itself,
rather than by the agent.


Dave

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to