net/udp: Populate the udp connection structure with the address family.
The udp connection structure contains the field, "domain", which defines which address family it belongs to. Prior to this change, this field was only populated correctly if IPv4 and IPv6 was enabled. As a result, packet information was not processed in udp_recvpktinfo, as expected when the appropriate socket option was enabled.
This commit is contained in:
parent
037a6f5836
commit
30f8cf541c
@ -638,7 +638,7 @@ FAR struct udp_conn_s *udp_alloc(uint8_t domain)
|
||||
|
||||
conn->sconn.ttl = IP_TTL_DEFAULT;
|
||||
conn->flags = 0;
|
||||
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
|
||||
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
|
||||
conn->domain = domain;
|
||||
#endif
|
||||
conn->lport = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user