Within a status report, check that NACK_SNs are not 'ahead' of ACK_SN.

svn path=/trunk/; revision=41493
This commit is contained in:
Martin Mathieson 2012-03-11 23:44:03 +00:00
parent c00ca87104
commit 5a84afd814
1 changed files with 6 additions and 0 deletions

View File

@ -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;