sixlowpan: improve tcp support.

Update the handling of tcp packets over sixlowpan. `tcp_ipv6_input()`
can update the dev->d_iob. Assigning ipv6 to IPv6BUF makes sure that
the correct buffer is used.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This commit is contained in:
Laczen JMS
2025-02-20 09:27:59 +01:00
committed by Alan C. Assis
parent 9f85eaf3cb
commit 34aa17b7a0

View File

@@ -463,6 +463,12 @@ static int ipv6_in(FAR struct net_driver_s *dev)
if ((dev->d_len > 0 && dev->d_lltype == NET_LL_IEEE802154) ||
(dev->d_len > 0 && dev->d_lltype == NET_LL_PKTRADIO))
{
/* tcp_ipv6_input() can update dev->d_iob. Update ipv6 to ensure
* using the correct data.
*/
ipv6 = IPv6BUF;
/* Let 6LoWPAN handle the TCP output */
sixlowpan_tcp_send(dev, dev, ipv6);