aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rlc-lte.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2012-03-11 23:44:03 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2012-03-11 23:44:03 +0000
commit5a84afd814b5ece9ac883c36df5fc746f0308fdb (patch)
tree84782bf42e53f4cacbacc4ad77ffa9ae041a55d1 /epan/dissectors/packet-rlc-lte.c
parentc00ca871044196fabd10b3c30d709d56ffb89133 (diff)
Within a status report, check that NACK_SNs are not 'ahead' of ACK_SN.
svn path=/trunk/; revision=41493
Diffstat (limited to 'epan/dissectors/packet-rlc-lte.c')
-rw-r--r--epan/dissectors/packet-rlc-lte.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index e31b9007dc..0ba1291ba8 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -2143,6 +2143,12 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
ack_sn);
}
+ /* NACK should always be 'behind' the ACK */
+ if ((1024 + ack_sn - nack_sn) % 1024 > 512) {
+ expert_add_info_format(pinfo, nack_ti, PI_MALFORMED, PI_ERROR,
+ "NACK must not be ahead of ACK in status PDU");
+ }
+
/* Copy into struct, but don't exceed buffer */
if (nack_count < MAX_NACKs) {
tap_info->NACKs[nack_count++] = (guint16)nack_sn;