gbarr / perl-Convert-ASN1

encode/decode data using ASN.1 description
http://search.cpan.org/dist/Convert-ASN1/
13 stars 21 forks source link

Decode PDUs with varbinds pointing to noSuchInstance OIDs #21

Open sndrsmnk opened 9 years ago

sndrsmnk commented 9 years ago

PDUs that tcpdump interprets as:

V2Trap(224)
  .1.3.6.1.2.1.1.3.0=3158708931
  .1.3.6.1.6.3.1.1.4.1.0=.1.3.6.1.4.1.9.0.1 .1.3.6.1.4.1.9.2.9.3.1.1.2.1=6
  .1.3.6.1.2.1.6.13.1.1.32.1.7.184.22.32.1.7.184.43666=5
  .1.3.6.1.4.1.9.2.6.1.1.5.32.1.7.184.22.32.1.7.184.43666=[noSuchInstance]
  .1.3.6.1.4.1.9.2.6.1.1.1.32.1.7.184.22.32.1.7.184.43666=[noSuchInstance]
  .1.3.6.1.4.1.9.2.6.1.1.2.32.1.7.184.22.32.1.7.184.43666=[noSuchInstance]
  .1.3.6.1.4.1.9.2.9.2.1.18.2="rancid"

Result in a very obscure 'decode error' in _decode.pm because of the [noSuchInstance] varbinds. This pull request was hacked together but seems to work to pass them on anyways and decode the PDU (SNMP Trap in my case).

sndrsmnk commented 9 years ago

The raw PDU is provided at https://8n1.org/raw_pdu.dat

jamesrleu commented 8 years ago

Was this fix pulled into a CPAN release? If so what was the first CPAN release to contain this fix. Thank you