network: Drop non unicast UDP packets#5208
Open
bkerler wants to merge 2 commits intoprusa3d:masterfrom
Open
Conversation
This was referenced Mar 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR solves issue #5115
This change addresses upload stalls and 408 Request Timeout failures caused by large fragmented UDP broadcast/multicast traffic overwhelming the networking stack.
The issue report showed that the printer was receiving repeated large OpenWrt usteer UDP broadcasts, attempting IPv4 fragment reassembly for them, and eventually emitting ICMP "fragment reassembly time exceeded" replies. While that reassembly state was active, PrusaLink / PrusaConnect traffic could stall badly enough to break uploads.
Instead of increasing the RX pool size globally as suggested in PR #5185, this PR drops fragmented non-unicast IPv4 UDP traffic before it reaches lwIP reassembly:
Ethernet path drops it before pbuf allocation
ESP/Wi-Fi path drops it before handing the packet to lwIP
This keeps normal unicast traffic unchanged and avoids a large always-on RAM increase.