On Mon, Jul 24, 2000 at 04:38:01PM +1000, HOOD, Andy wrote:
> Has anyone noticed that the hex decode of SNMP trap "Agent address" is not
> highlighted correctly?
> It seems to use the length of the address (4) without the length of the
> prefix (2), so not highlighting the last two bytes.
> Sorry I can't see where to fix.
Does the attached patch to "packet-snmp.c" fix the problem?
Index: packet-snmp.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-snmp.c,v
retrieving revision 1.43
diff -c -r1.43 packet-snmp.c
*** packet-snmp.c 2000/07/08 08:33:29 1.43
--- packet-snmp.c 2000/07/25 06:38:21
***************
*** 1093,1100 ****
}
length = asn1.pointer - start;
if (tree) {
! proto_tree_add_text(tree, NullTVB, offset,
! agent_address_length,
"Agent address: %s", ip_to_str(agent_address));
}
g_free(agent_address);
--- 1093,1099 ----
}
length = asn1.pointer - start;
if (tree) {
! proto_tree_add_text(tree, NullTVB, offset, length,
"Agent address: %s", ip_to_str(agent_address));
}
g_free(agent_address);