aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mip6.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-02-14 13:03:45 +0100
committerMichael Mann <mmann78@netscape.net>2015-02-14 16:41:30 +0000
commitca534b1561c70f7d882d9d00bacf242a23346365 (patch)
tree98cc5d12ae25746ebb912c85b818a1cfa8323d66 /epan/dissectors/packet-mip6.c
parent847f59096304a7aeebf7e9c498986cb05b960540 (diff)
MIP6: Local Mobility Anchor Address mobility option code is treated incorrectly
The first packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=1. Wireshark parses its address as IPv4 address. The second packet is an IPv6 packet with Local Mobility Anchor Address mobility option with Option-Code=2. Wireshark parses its address as IPv6 address. According to RFC 5949 (https://tools.ietf.org/html/rfc5949#section-6.2.2), Option-Code=1 means IPv6 and Option-Code=2 means IPv4, exactly the opposite to what Wireshark does. Bug: 10961 Change-Id: I03b76dda8beae211e67e6c9e1f40d122e851b1b5 Reviewed-on: https://code.wireshark.org/review/7113 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r--epan/dissectors/packet-mip6.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index dcc3dc7628..2a9f599153 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -2892,13 +2892,14 @@ dissect_pmip6_opt_lmaa(const mip6_opt *optp _U_, tvbuff_t *tvb, int offset,
offset += 1;
if (opt_code == 1) {
- /* IPv4 addr */
- proto_tree_add_item(opt_tree, hf_mip6_lmaa_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_item_append_text(hdr_item, ": %s", tvb_ip_to_str(tvb,offset));
- }else if (opt_code == 2) {
/* Ipv6 Addr */
proto_tree_add_item(opt_tree, hf_mip6_lmaa_ipv6, tvb, offset, 16, ENC_NA);
proto_item_append_text(hdr_item, ": %s", tvb_ip6_to_str(tvb,offset));
+ }else if (opt_code == 2) {
+ /* IPv4 addr */
+ proto_tree_add_item(opt_tree, hf_mip6_lmaa_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_item_append_text(hdr_item, ": %s", tvb_ip_to_str(tvb,offset));
+
}
}