Discussion:
Net-snmp 5.7.3, timeticks: wrong parsing?
Andrew
2017-06-09 15:06:26 UTC
Permalink
Hi all.

I've implemented embedded SNMPv1 agent, and I saw that there's trouble
in parsing timeticks in some rare cases (when time is between ~10 and
~30 minutes). Seems like trouble is when higher bit is set. tcpdump
parses data OK.

Is it net-snmp client bug, or something wrong in response?

snmpget request/response:

$ snmpget -v1 -c xxxxxx 192.168.0.11 .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (4294953866) 497 days,
2:25:38.66

tcpdump:

17:51:27.105193 IP 192.168.0.145.54307 > 192.168.0.11.161: C="xxxxxxxx"
GetRequest(28) .1.3.6.1.2.1.1.3.0
17:51:27.109626 IP 192.168.0.11.161 > 192.168.0.145.54307: C="xxxxxxxx"
GetResponse(30) .1.3.6.1.2.1.1.3.0=52106

response packet (community is masked):

00000000: 30 2D 02 01 00 04 08 xx xx xx xx xx xx xx xx A2
00000010: 1E 02 04 3C 21 EA 80 02 01 00 02 01 00 30 10 30
00000020: 0E 06 08 2B 06 01 02 01 01 03 00 43 02 CB 8A
Andrew
2017-06-09 18:31:55 UTC
Permalink
Ooops, I missed that timetick is encoded like signed int...
Post by Andrew
Hi all.
I've implemented embedded SNMPv1 agent, and I saw that there's trouble
in parsing timeticks in some rare cases (when time is between ~10 and
~30 minutes). Seems like trouble is when higher bit is set. tcpdump
parses data OK.
Is it net-snmp client bug, or something wrong in response?
$ snmpget -v1 -c xxxxxx 192.168.0.11 .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (4294953866) 497
days, 2:25:38.66
C="xxxxxxxx" GetRequest(28) .1.3.6.1.2.1.1.3.0
C="xxxxxxxx" GetResponse(30) .1.3.6.1.2.1.1.3.0=52106
00000000: 30 2D 02 01 00 04 08 xx xx xx xx xx xx xx xx A2
00000010: 1E 02 04 3C 21 EA 80 02 01 00 02 01 00 30 10 30
00000020: 0E 06 08 2B 06 01 02 01 01 03 00 43 02 CB 8A
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Loading...