net_lwip_webserver: drop oversized frames in linkoutput
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- networking
Research direction
Start in examples/device/net_lwip_webserver/src/main.c at linkoutput_fn() and read how it passes pbufs to tud_network_xmit(); check the network class transmit path if considering the alternative fix. Reject frames whose p->tot_len exceeds CFG_TUD_NET_MTU, return ERR_BUF, and count the drop. Done when oversized frames are dropped before transmission and the drop is counted.
Written by the indexing model from the issue text.
Description
Follow-up from #4279.
examples/device/net_lwip_webserver/src/main.c:114 linkoutput_fn() hands any pbuf to tud_network_xmit() without checking p->tot_len against CFG_TUD_NET_MTU. #4279 fixes the normal path by setting netif->mtu so lwIP fragments, but a frame that bypasses IP fragmentation (raw/etharp output, or a misconfigured MTU) still reaches the class oversized; CDC-ECM then fails bulk-IN with -EOVERFLOW on the host and misframes the stream, as seen before #4279 on stm32f407disco.
Remaining work: drop frames with p->tot_len > CFG_TUD_NET_MTU in linkoutput_fn() (return ERR_BUF, count the drop), or bound it in the class tud_network_xmit() path so every user is covered.
Deferred: #4279 kept to the MTU setting the issue reported.
- Dominant language
- C
- Stars
- 7.3k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 99
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
Similar issues
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdictPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation severity: low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
luainkernel/lunatik#2231 ·
Maintainers usually reply within 1 day
-
aspect ratio 16:10Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Revivedx/SavageWindRecomp#402 ·
Maintainers usually reply within 1 day
-
cleanup help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ESPresense/ESPresense#2602 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow-swift#209 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
libretiny-eu/libretiny#435 ·
Maintainers usually reply within 4 days