diff options
| author | HiFiPhile <[email protected]> | 2025-01-22 21:02:35 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-22 21:02:35 +0100 |
| commit | feb41eecebdc7544dff066f8004d48f156adada4 (patch) | |
| tree | 5625bd3bd1b6cc38b7497b60cffd4787608eb7e3 /src | |
| parent | 2d7d1070fc9eb8db7061b4f0e20408a453df1f7e (diff) | |
| parent | 6476ff12417be6df834333410f4fb2e64049fe7a (diff) | |
Merge pull request #2950 from espressif/fix/ncm_buffer_validation
fix(ncm): Return invalid NTBs to free list
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/net/ncm_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/net/ncm_device.c b/src/class/net/ncm_device.c index aac11a058..f9fda0698 100644 --- a/src/class/net/ncm_device.c +++ b/src/class/net/ncm_device.c @@ -857,7 +857,8 @@ bool netd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_ // - if there is a free receive buffer, initiate reception if (!recv_validate_datagram(ncm_interface.recv_tinyusb_ntb, xferred_bytes)) { // verification failed: ignore NTB and return it to free - TU_LOG_DRV("(EE) VALIDATION FAILED. WHAT CAN WE DO IN THIS CASE?\n"); + TU_LOG_DRV("Invalid datatagram. Ignoring NTB\n"); + recv_put_ntb_into_free_list(ncm_interface.recv_tinyusb_ntb); } else { // packet ok -> put it into ready list recv_put_ntb_into_ready_list(ncm_interface.recv_tinyusb_ntb); |
