qcacmn: Drop frame if msdu len received is Zero

In monitor destination ring, sometime buffer with
msdu_len zero is observed.
Drop frame if msdu len is zero.

Change-Id: I327e180a52ec5f4e0d9fc2d0391262cba0dbe09d
This commit is contained in:
Ankit Kumar
2020-10-22 15:50:43 +05:30
committed by snandini
parent 5d68a204f0
commit 8f311b08dd

View File

@@ -651,9 +651,10 @@ QDF_STATUS dp_rx_mon_add_msdu_to_list(qdf_nbuf_t *head_msdu, qdf_nbuf_t msdu,
qdf_nbuf_t msdu_curr;
/* Here head_msdu and *head_msdu must not be NULL */
if (qdf_unlikely(!head_msdu || !(*head_msdu))) {
dp_err("[%s] head_msdu || *head_msdu is Null while adding frag to skb\n",
__func__);
/* Dont add frag to skb if frag length is zero. Drop frame */
if (qdf_unlikely(!frag_len || !head_msdu || !(*head_msdu))) {
dp_err("[%s] frag_len[%d] || head_msdu[%pK] || *head_msdu is Null while adding frag to skb\n",
__func__, frag_len, head_msdu);
return QDF_STATUS_E_FAILURE;
}