diff options
author | Michael Mann <mmann78@netscape.net> | 2014-04-19 12:52:21 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-04-19 17:41:17 +0000 |
commit | c03f13bda8be7db381eb52a090af5871706dfb20 (patch) | |
tree | 6c10d5ad0fc2e3333f380ebec4689189cdb79331 /epan | |
parent | 9496733c5309b51045b253bb8be87510e31b8076 (diff) |
IPV6 Mobility Header Binding Revocation Acknowledge Global field is the wrong bit
According to RFC 5846 (https://tools.ietf.org/html/rfc5846#section-5.2), there are 3 bits in the Binding Revocation Acknowledgement Message, which come in the following order:
1. Proxy Binding (P)
2. IPv4 HoA Binding Only (V)
3. Global (G)
Found by Boaz Brickner
From Alexis: MIP6 dissector is based on old draft...
Closed-bug: 10007
Change-Id: I570381171e1455cc03fa7b40bf682d6ed7bd0a92
Reviewed-on: https://code.wireshark.org/review/1203
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-mip6.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c index bbbf3850da..85bbe7067b 100644 --- a/epan/dissectors/packet-mip6.c +++ b/epan/dissectors/packet-mip6.c @@ -785,8 +785,7 @@ static const value_string mip6_mng_id_type_vals[] = { #define PMIP6_BRI_RTRIGGER_LEN 1 #define PMIP6_BRI_STATUS_LEN 1 #define PMIP6_BRI_SEQNR_LEN 2 -#define PMIP6_BRI_FLAGS_LEN 1 -#define PMIP6_BRI_RES_LEN 1 +#define PMIP6_BRI_FLAGS_LEN 2 /* Field offsets & field and option lengths for mobility options. * The option length does *not* include the option type and length @@ -1100,7 +1099,8 @@ static int hf_pmip6_bri_status = -1; static int hf_pmip6_bri_seqnr = -1; static int hf_pmip6_bri_ip_flag = -1; static int hf_pmip6_bri_ap_flag = -1; -static int hf_pmip6_bri_ia_flag = -1; +static int hf_pmip6_bri_iv_flag = -1; +static int hf_pmip6_bri_av_flag = -1; static int hf_pmip6_bri_ig_flag = -1; static int hf_pmip6_bri_ag_flag = -1; static int hf_pmip6_bri_res = -1; @@ -1638,14 +1638,14 @@ dissect_pmip6_bri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo) proto_tree_add_item(field_tree, hf_pmip6_bri_ip_flag, tvb, PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); - proto_tree_add_item(field_tree, hf_pmip6_bri_ia_flag, tvb, + proto_tree_add_item(field_tree, hf_pmip6_bri_iv_flag, tvb, PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_pmip6_bri_ig_flag, tvb, PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_pmip6_bri_res, tvb, - PMIP6_BRI_RES_OFF, PMIP6_BRI_RES_LEN, ENC_BIG_ENDIAN); + PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); } } else if ( br_type == ACKNOWLEDGE ) { @@ -1670,11 +1670,14 @@ dissect_pmip6_bri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo) proto_tree_add_item(field_tree, hf_pmip6_bri_ap_flag, tvb, PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); + proto_tree_add_item(field_tree, hf_pmip6_bri_av_flag, tvb, + PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); + proto_tree_add_item(field_tree, hf_pmip6_bri_ag_flag, tvb, PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); proto_tree_add_item(field_tree, hf_pmip6_bri_res, tvb, - PMIP6_BRI_RES_OFF, PMIP6_BRI_RES_LEN, ENC_BIG_ENDIAN); + PMIP6_BRI_FLAGS_OFF, PMIP6_BRI_FLAGS_LEN, ENC_BIG_ENDIAN); } } @@ -4368,38 +4371,43 @@ proto_register_mip6(void) { &hf_pmip6_bri_ip_flag, { "Proxy Binding (P) Flag", "mip6.bri_ip", - FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x8000, NULL, HFILL } }, - { &hf_pmip6_bri_ia_flag, - { "Acknowledge (A) Flag", "mip6.bri_ia", - FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, + { &hf_pmip6_bri_iv_flag, + { "IPv4 HoA Binding Only (V) Flag", "mip6.bri_iv", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x4000, NULL, HFILL } }, { &hf_pmip6_bri_ig_flag, { "Global (G) Flag", "mip6.bri_ig", - FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x20, + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x2000, NULL, HFILL } }, { &hf_pmip6_bri_ap_flag, { "Proxy Binding (P) Flag", "mip6.bri_ap", - FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x80, + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x8000, + NULL, HFILL } + }, + { &hf_pmip6_bri_av_flag, + { "IPv4 HoA Binding Only (V) Flag", "mip6.bri_av", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x4000, NULL, HFILL } }, { &hf_pmip6_bri_ag_flag, { "Global (G) Flag", "mip6.bri_ag", - FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40, + FT_BOOLEAN, 16, TFS(&tfs_set_notset), 0x2000, NULL, HFILL } }, { &hf_pmip6_bri_res, - { "Reserved: 1 byte", "mip6.bri_res", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } + { "Reserved", "mip6.bri_res", + FT_UINT16, BASE_HEX, NULL, 0x1FFF, + "Must be zero", HFILL } }, { &hf_mip6_opt_mng_sub_type, |