-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cores/liteeth_mini/mac/sram: fix reception of frames larger than MTU
-use 32bits length CSR (allow software to detect frames larger than MTU) -drop remaining bytes
1 parent
6e86189
commit e136030
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is not safe. If it receives a frame larger than 4GB (due to malfunction or malicious activities) the counter will wrap and it will resume writing. If this is connected to DMA this can do some damage.
I propose testing for
counter == eth_mtu
(which also has better timing than<
) and putting the FSM into a "discard the remaining of the frame" state.