net-snmp icon indicating copy to clipboard operation
net-snmp copied to clipboard

Counter32 Bug

Open krab22 opened this issue 9 years ago • 1 comments

Good afternoon! When testing the SNMP agent noticed the following: I make an inquiry "snmpget -v 2c -c readcomunity 127.0.0.1 1.3.6.1.4.1.20000.1.4.0" getting "SNMPv2-SMI :: enterprises.20000.1.4.0 = Counter32: 4294967295"

Thus the agent in response to the request, outputs the packet "0x30:0x34:0x02:0x01:0x01:0x04:0x0C:0x72:0x65:0x61:0x64:0x63:0x6F:0x6D:0x75:0x6E:0x69:0x74:0x79:0xA2:0x21:0x02:0x04:0x3E:0x26:0x55:0xF2:0x02:0x01:0x00:0x02:0x01:0x00:0x30:0x13:0x30:0x11:0x06:0x0B:0x2B:0x06:0x01:0x04:0x01:0x81:0x9C:0x20:0x01:0x04:0x00:0x41:0x02:0xFF:0xFF:"

Ie in the package comes to 65535 (FFFF).

The error most likely occurs because of the type conversion when parsing came the answer.

Sorry for my english. I use a translator.

krab22 avatar Jul 03 '15 07:07 krab22

Name: net-snmp Arch: x86_64 Version: 5.7.2 Build: 23.fc21

krab22 avatar Jul 03 '15 08:07 krab22