aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMatt Texier <matthieu@texier.tv>2016-06-29 17:33:21 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-06-30 05:39:44 +0000
commite55eaf573b593d9578aac6847acf3d79e5f3a7dc (patch)
tree6a92fc69ee532b568bf96076df4cf993cf10370d /epan
parente4c86ac83c558b760d81ac17ae407e614a15c1c6 (diff)
BGP dissector: Fixing NLRI length for flow spec NLRI
Bug: 12568 Change-Id: Id2b89c2d133865771e21acf3ee224f57ac9d262b Reviewed-on: https://code.wireshark.org/review/16203 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bgp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c
index 7c1f49bf3c..6437e324c2 100644
--- a/epan/dissectors/packet-bgp.c
+++ b/epan/dissectors/packet-bgp.c
@@ -2577,7 +2577,7 @@ decode_flowspec_nlri(proto_tree *tree, tvbuff_t *tvb, gint offset, guint16 afi,
if (tot_flow_len >= 240)
{
len_16 = tvb_get_ntohs(tvb, offset);
- tot_flow_len = len_16 >> 4; /* move 4 bits to the right to remove first f */
+ tot_flow_len = len_16 & 0x0FFF; /* remove most significant nibble */
offset_len = 2;
} else {
offset_len = 1;