Skip to content
Commit 91034033 authored by Jun Qing Zou's avatar Jun Qing Zou Committed by Ioannis Glaropoulos
Browse files

net: lwm2m: support NET_SOCKETS_OFFLOAD in peer parsing

The LwM2M implementation for DNS resolving has checks which
configure hints based on whether IPv4 or IPv6 are enabled.
Neither of them need enabled if using NET_SOCKETS_OFFLOAD,
which then causes an error to be returned to due to
"hints.ai_family" not being set.

Also the offload API need to know when to free the allocated
"struct addrinfo" instead of calling free() generically,
thus let's use the freeaddrinfo() API for sockets which will
call into the offload API if needed.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/18765



Signed-off-by: default avatarJun Qing Zou <jun.qing.zou@nordicsemi.no>
parent 5ac014aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment