From f42758b3f096c2d9f45b846c7c66902cd92da144 Mon Sep 17 00:00:00 2001 From: nuttxs Date: Mon, 19 Aug 2024 18:52:20 +0800 Subject: [PATCH] net/pkt: fix raw socket send data length is insufficient. --- net/pkt/pkt_sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/pkt/pkt_sendmsg.c b/net/pkt/pkt_sendmsg.c index 12fb1a2414ce7..09a23a502d422 100644 --- a/net/pkt/pkt_sendmsg.c +++ b/net/pkt/pkt_sendmsg.c @@ -113,7 +113,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev, goto end_wait; } - dev->d_len = dev->d_sndlen -= NET_LL_HDRLEN(dev); + dev->d_len = dev->d_sndlen; pstate->snd_sent = pstate->snd_buflen; /* Make sure no ARP request overwrites this ARP request. This