This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch releases/10.1
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/releases/10.1 by this push:
new 367dc9a drivers: wireless: Fix to receive a UDP packet partially in
gs2200m.c
367dc9a is described below
commit 367dc9a29ae0cff677d89e306f0e350fbb601cb5
Author: Masayuki Ishikawa <[email protected]>
AuthorDate: Tue Apr 13 18:27:09 2021 +0900
drivers: wireless: Fix to receive a UDP packet partially in gs2200m.c
Summary:
- When receiving a UDP packet partially, the rest of the packet
must be discarded.
Impact:
- None
Testing:
- Tested with a UDP sample program
Reported-by: Masatoshi Ueno <[email protected]>
Signed-off-by: Masayuki Ishikawa <[email protected]>
---
drivers/wireless/gs2200m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c
index f8a25bf..bd28cb9 100644
--- a/drivers/wireless/gs2200m.c
+++ b/drivers/wireless/gs2200m.c
@@ -650,7 +650,7 @@ static bool _copy_data_from_pkt(FAR struct gs2200m_dev_s
*dev,
pkt_dat->remain -= len;
- if (0 == pkt_dat->remain)
+ if (0 == pkt_dat->remain || TYPE_BULK_DATA_UDP == pkt_dat->type)
{
_remove_and_free_pkt(dev, c);
}