Files
u-boot-krane/net
Weijie GaoandJerome Forissier 02154ba036 net: lwip: handle chained pbufs in transmit path
LwIP may pass a packet to the netif linkoutput callback as a chain
of pbufs. In this case, p->len only describes the length of the
first pbuf, while p->tot_len describes the length of the whole
packet.

The current transmit path only sends the first pbuf. This can
truncate packets whose headers have already been generated for the
full packet length, resulting in malformed frames on the wire.
For example, the IP header may record a larger total length than the
actual Ethernet frame length.

Assemble chained pbufs into one aligned contiguous buffer before
passing the packet to the Ethernet driver.

Fixes: 98ad145db6 (net: lwip: add DHCP support and dhcp commmand)
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
2026-07-23 17:05:20 +02:00
..