check if eth rx packet is overflow

This commit is contained in:
sakumisu
2024-05-03 19:19:17 +08:00
parent 7ebcafe158
commit ae5a9d1e57
5 changed files with 29 additions and 9 deletions

View File

@@ -279,6 +279,10 @@ find_class:
}
} else {
/* read continue util read short packet */
if (g_cdc_ecm_rx_length > CONFIG_USBHOST_CDC_ECM_ETH_MAX_SEGSZE) {
USB_LOG_ERR("Rx packet is overflow\r\n");
g_cdc_ecm_rx_length = 0;
}
}
}
// clang-format off