mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
net/udp: set ipv6 remote addr before udpip_hdrsize
In this case, remote addr is all zero, and the length of the ip header is not recognized as ipv6_is_ipv4, This will cause problems in subsequent data filling. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
9852428953
commit
e1a1f7b5f4
@@ -792,6 +792,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(&wrb->wb_dest, to, tolen);
|
memcpy(&wrb->wb_dest, to, tolen);
|
||||||
|
udp_connect(conn, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip l2/l3/l4 offset before copy */
|
/* Skip l2/l3/l4 offset before copy */
|
||||||
|
|||||||
Reference in New Issue
Block a user