I was noticing that ethereal does not properly display decoded OID
varbinds. Since .1.3 is encoded as one octet (2b), ethereal ends up
chopping off the last octet in an OID varbind. I noticed this when trying
to decode sysObjectID from one of our routers. ethereal always reported
.1.3.6.1.4.1.9.1 and never mentioned the trailing .50. The asn.1 code is
correct, but the code that displays the data is forgetting the last octet.
Attached is a patch for the CVS packet-snmp.c that fixes this.
Not sure if it's the best way to do it, but it works for me on FreeBSD
4.3.
By the way, thanks for all the hard work with ethereal.
Joe Clarke
--
Joe Clarke, CCIE #5384 | |
Customer Support Engineer ||||| |||||
Phone: +1 (919) 392-2867 ..:|||||||||::|||||||||:..
Email: jclarke@xxxxxxxxx c i s c o S y s t e m s
----------------------------------------------------------------------------
*** packet-snmp.c.orig Mon May 21 18:08:07 2001
--- packet-snmp.c Mon May 21 18:08:18 2001
***************
*** 902,908 ****
variable.val.objid = vb_oid;
vb_display_string = format_var(&variable,
variable_oid, variable_oid_length, vb_type,
! vb_length);
proto_tree_add_text(snmp_tree, asn1->tvb, offset,
length,
"Value: %s", vb_display_string);
--- 902,908 ----
variable.val.objid = vb_oid;
vb_display_string = format_var(&variable,
variable_oid, variable_oid_length, vb_type,
! vb_length+1);
proto_tree_add_text(snmp_tree, asn1->tvb, offset,
length,
"Value: %s", vb_display_string);