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:
zhanghongyu 2023-12-25 21:00:01 +08:00 committed by Alin Jerpelea
parent 9852428953
commit e1a1f7b5f4

View File

@ -792,6 +792,7 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf,
else
{
memcpy(&wrb->wb_dest, to, tolen);
udp_connect(conn, to);
}
/* Skip l2/l3/l4 offset before copy */