aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2017-09-29 10:58:56 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2017-09-29 09:31:11 +0000
commit4ef7894862769bfea39ea74ec16d42a150bc2545 (patch)
tree92012737a40f825090441336d26ffb0467d663b7
parentd3e34586c5e75685f9792b9104363c684fc3e174 (diff)
btle: Improve retransmit detection
Only use SN to detect retransmission. Lower retransmit expert info severity to Note. Change-Id: I4604903cce9cc58a6fcffff6597e7e99d228aa80 Reviewed-on: https://code.wireshark.org/review/23780 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r--epan/dissectors/packet-btle.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/epan/dissectors/packet-btle.c b/epan/dissectors/packet-btle.c
index 5fe247f0c1..ecf942bcef 100644
--- a/epan/dissectors/packet-btle.c
+++ b/epan/dissectors/packet-btle.c
@@ -297,7 +297,6 @@ typedef struct _connection_info_t {
/* Connection information */
/* Data used on the first pass to get info from previous frame, result will be in per_packet_data */
guint first_data_frame_seen : 1;
- guint nextexpectedseqnum : 1;
direction_info_t direction_info[3]; /* UNKNOWN, MASTER_SLAVE and SLAVE_MASTER */
} connection_info_t;
@@ -947,20 +946,15 @@ dissect_btle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
if (!connection_info->first_data_frame_seen) {
connection_info->first_data_frame_seen = 1;
btle_frame_info->retransmit = 0;
- connection_info->nextexpectedseqnum = 0;
+ connection_info->direction_info[BTLE_DIR_MASTER_SLAVE].prev_seq_num = 0;
+ connection_info->direction_info[BTLE_DIR_SLAVE_MASTER].prev_seq_num = 1;
}
else {
- guint8 nextexpectedseqnum = !!(oct & 0x4);
guint8 seq_num = !!(oct & 0x8);
- if ((seq_num == connection_info->nextexpectedseqnum) &&
- (seq_num != connection_info->direction_info[direction].prev_seq_num)) {
- /*
- * SN is equal to previous packet (in connection) NESN and
- * SN is not equal to previous packet (in same direction) SN.
- */
+ if (seq_num != connection_info->direction_info[direction].prev_seq_num) {
+ /* SN is not equal to previous packet (in same direction) SN */
btle_frame_info->retransmit = 0;
- connection_info->nextexpectedseqnum = nextexpectedseqnum;
}
else {
btle_frame_info->retransmit = 1;
@@ -2028,7 +2022,7 @@ proto_register_btle(void)
{ &ei_missing_fragment_start,
{ "btle.missing_fragment_start", PI_SEQUENCE, PI_WARN, "Missing Fragment Start", EXPFILL }},
{ &ei_retransmit,
- { "btle.retransmit", PI_SEQUENCE, PI_WARN, "Retransmission", EXPFILL }},
+ { "btle.retransmit", PI_SEQUENCE, PI_NOTE, "Retransmission", EXPFILL }},
};
static gint *ett[] = {