mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
net/udp: Associated with last commit. Make sure that the new connection flag is cleared when a new UDP connection structure is allocated.
This commit is contained in:
+1
-2
@@ -352,8 +352,6 @@ static inline FAR struct udp_conn_s *
|
|||||||
* address, then accept the packet.
|
* address, then accept the packet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(net_ipv4addr_cmp(conn->u.ipv4.raddr, INADDR_ANY) ||
|
(net_ipv4addr_cmp(conn->u.ipv4.raddr, INADDR_ANY) ||
|
||||||
#ifdef CONFIG_NET_BROADCAST
|
#ifdef CONFIG_NET_BROADCAST
|
||||||
net_ipv4addr_hdrcmp(ip->destipaddr, &bcast) ||
|
net_ipv4addr_hdrcmp(ip->destipaddr, &bcast) ||
|
||||||
@@ -580,6 +578,7 @@ FAR struct udp_conn_s *udp_alloc(uint8_t domain)
|
|||||||
{
|
{
|
||||||
/* Make sure that the connection is marked as uninitialized */
|
/* Make sure that the connection is marked as uninitialized */
|
||||||
|
|
||||||
|
conn->flags = 0;
|
||||||
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
|
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
|
||||||
conn->domain = domain;
|
conn->domain = domain;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user