Report as expert/malformed if the same SN appears as ACK and NACK in same status...
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Sep 2011 16:45:03 +0000 (16:45 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Sep 2011 16:45:03 +0000 (16:45 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39077 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-rlc-lte.c

index 39144263e5832a6082d083e4c34166c579eb38b1..bf6f2107d438388620587fb989a47a265c98373e 100644 (file)
@@ -1966,6 +1966,13 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb,
             bit_offset += 10;
             write_pdu_label_and_info(top_ti, NULL, pinfo, "  NACK_SN=%-4u", (guint16)nack_sn);
 
+            /* We shouldn't NACK the ACK_SN! */
+            if (nack_sn == ack_sn) {
+                expert_add_info_format(pinfo, nack_ti, PI_MALFORMED, PI_ERROR,
+                                       "Status PDU shouldn't ACK and NACK the same sequence number (%llu)",
+                                       ack_sn);
+            }
+
             /* Copy into struct, but don't exceed buffer */
             if (nack_count < MAX_NACKs) {
                 tap_info->NACKs[nack_count++] = (guint16)nack_sn;