On 15/07/2026 10:42, Weijie Gao wrote:
> 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: 98ad145db61a (net: lwip: add DHCP support and dhcp commmand)
> Signed-off-by: Weijie Gao <[email protected]>

Good catch! That was a big oversight :-/ thanks for the fix.

Reviewed-by: Jerome Forissier <[email protected]>

-- 
Jerome

Reply via email to