diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-10-16 14:07:39 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-10-25 19:22:00 +0000 |
commit | 40ce00fc8b4fdf389c6c382d9fe5418c84b0d5cb (patch) | |
tree | 10bec15f1756be5d12d9ddf6d752bb221274dc3f | |
parent | 180cbcf4365e57967f9fdf33b7570da0aec969be (diff) |
gsm_abis_tfp: Fix bit-mask for frame type
The frame type is only a select number of bits in the given byte,
so we must make sure to mask all other bits away using 0x1E.
Change-Id: I6c7a1a256bd93b6e5149f50ed64f033836a26673
Reviewed-on: https://code.wireshark.org/review/18458
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-gsm_abis_tfp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gsm_abis_tfp.c b/epan/dissectors/packet-gsm_abis_tfp.c index 1a6587d1c3..9c39e1ce38 100644 --- a/epan/dissectors/packet-gsm_abis_tfp.c +++ b/epan/dissectors/packet-gsm_abis_tfp.c @@ -113,7 +113,7 @@ dissect_abis_tfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree_add_item(tfp_tree, hf_tfp_hdr_s, tvb, offset+2, 1, ENC_NA); proto_tree_add_item(tfp_tree, hf_tfp_hdr_m, tvb, offset+2, 1, ENC_NA); /* Frame Type depends on Slot Rate */ - ftype = tvb_get_guint8(tvb, offset+2); + ftype = tvb_get_guint8(tvb, offset+2) & 0x1E; if (slot_rate == 0) ftype |= 0x80; proto_tree_add_uint_format_value(tfp_tree, hf_tfp_hdr_frame_type, tvb, offset+2, 1, ftype, "%s", @@ -181,7 +181,7 @@ proto_register_abis_tfp(void) }, { &hf_tfp_hdr_frame_type, { "Frame Type", "gsm_abis_tfp.frame_type", - FT_UINT8, BASE_DEC, VALS(tfp_frame_type_vals), 0, + FT_UINT8, BASE_DEC, VALS(tfp_frame_type_vals), 0x1e, NULL, HFILL } }, }; |