diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-01-02 20:08:01 +0100 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-03 02:08:43 +0000 |
commit | 305a4f72cb2cd0570fc01a349828fe49c636affe (patch) | |
tree | 06e687cff1105d4f70ff25bc5fa2bb199e01f23d | |
parent | 582e9579e0f86fe9f1487be77b8ba9ca19087dc8 (diff) |
EIGRP: field eigrp.ipv4.destination does not show the correct destination
Reported by Fredrik Lönnman
Bug:11953
Change-Id: Icaff04122e8ed94751ea8aeb4069be2fc2dda52c
Reviewed-on: https://code.wireshark.org/review/13007
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/dissectors/packet-eigrp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c index 354c5d9e84..8a9f6fac09 100644 --- a/epan/dissectors/packet-eigrp.c +++ b/epan/dissectors/packet-eigrp.c @@ -1098,14 +1098,18 @@ static int dissect_eigrp_ipv4_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int unreachable) { - guint8 ip_addr[4], length; + guint8 length; + union { + guint8 addr_bytes[4]; + guint32 addr; + } ip_addr; int addr_len; proto_item *ti_prefixlen, *ti_dst; int first = TRUE; for (; tvb_reported_length_remaining(tvb, offset) > 0; offset += (1 + addr_len)) { length = tvb_get_guint8(tvb, offset); - addr_len = ipv4_addr_and_mask(tvb, offset + 1, ip_addr, length); + addr_len = ipv4_addr_and_mask(tvb, offset + 1, ip_addr.addr_bytes, length); if (addr_len < 0) { ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen, @@ -1119,8 +1123,8 @@ dissect_eigrp_ipv4_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - set_address(&addr, AT_IPv4, 4, ip_addr); - ti_dst = proto_tree_add_ipv4(tree, hf_eigrp_ipv4_destination, tvb, offset, addr_len, *ip_addr); + set_address(&addr, AT_IPv4, 4, ip_addr.addr_bytes); + ti_dst = proto_tree_add_ipv4(tree, hf_eigrp_ipv4_destination, tvb, offset, addr_len, ip_addr.addr); /* add it to the top level line */ proto_item_append_text(ti," %c %s/%u", first ? '=':',', |