This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new e1a1f7b5f4 net/udp: set ipv6 remote addr before udpip_hdrsize e1a1f7b5f4 is described below commit e1a1f7b5f4fc90f0d4708a9caab9e3bc00b5b7a9 Author: zhanghongyu <zhanghon...@xiaomi.com> AuthorDate: Mon Dec 25 21:00:01 2023 +0800 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 <zhanghon...@xiaomi.com> --- net/udp/udp_sendto_buffered.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/udp/udp_sendto_buffered.c b/net/udp/udp_sendto_buffered.c index 18dd21c6e4..764531867f 100644 --- a/net/udp/udp_sendto_buffered.c +++ b/net/udp/udp_sendto_buffered.c @@ -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 */