On Mon, 2026-07-27 at 16:02 +0800, 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]> > --- > net/lwip/net-lwip.c | 45 ++++++++++++++++++++++++++++++++----------- > -- > 1 file changed, 32 insertions(+), 13 deletions(-) >
Sorry, I sent this patch by mistake. Please ignore it.
