HPSW: fix neighbor MAC Address

Use the wrong length for display mac address (6 and no the length of option)
Also fix update of item (don't update the root item)

Change-Id: I38cd1a6a045e797b01cd1a8de5add0949eaa0f01
Reviewed-on: https://code.wireshark.org/review/4950
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2014-10-27 13:40:45 +01:00 committed by Anders Broman
parent e4c257a169
commit 9b37e1e207
1 changed files with 2 additions and 2 deletions

View File

@ -184,10 +184,10 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length,
case HPFOO_NEIGHBORS:
if (!(length % 6))
{ int i = length/6;
proto_item_set_text(ti, "Number of neighbor MAC Addresses: %u", i);
proto_item_set_text(proto_tree_get_parent(tree), "Number of neighbor MAC Addresses: %u", i);
for ( ; i; i--)
{
proto_tree_add_item(tree, hf_hpsw_neighbor_mac_addr, tvb, offset, length, ENC_NA);
proto_tree_add_item(tree, hf_hpsw_neighbor_mac_addr, tvb, offset, 6, ENC_NA);
offset += 6;
}
} else {