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:
parent
9852428953
commit
e1a1f7b5f4
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user