zephyr/subsys/net/lib/dns
Stig Bjørlykke 5da0d2928f net: dns: Fix end-of-results callback on error
Callers of dns_get_addr_info() depends on receiving an end-of-results
callback (where 'info' is NULL) when finished. Do this on failure in
cb_recv() instead of pointing to an empty object.

This fix will avoid a deadlock situation in getaddrinfo().

A reply code other than "no error" in the DNS response is a typical
case when the lookup failed and this occurs.

Moved "struct dns_addrinfo info" variable from cb_recv() to dns_read()
because it was now unused in cb_recv().

Adding tests for this requires network access and a DNS server,
or a mechanism for generating a DNS response with a reply code.

Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
2018-04-03 14:14:00 +03:00
..
CMakeLists.txt cmake: Use path-corrected version of ZEPHYR_BASE 2018-01-11 14:59:03 -05:00
Kconfig kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
dns_pack.c net: mdns: Initial mDNS responder support 2017-10-17 08:36:39 -04:00
dns_pack.h net: dns: Fix dns_pack.h documentation of packing routines 2017-10-17 08:36:39 -04:00
mdns_responder.c net: mdns: Check net_pkt before accessing it 2017-10-27 15:35:59 +03:00
resolve.c net: dns: Fix end-of-results callback on error 2018-04-03 14:14:00 +03:00