diff --git a/src/core/dns.c b/src/core/dns.c index 8bce106c..eabe8721 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -616,7 +616,7 @@ dns_lookup(const char *name, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_t dns_addr } #endif /* DNS_LOCAL_HOSTLIST */ #ifdef DNS_LOOKUP_LOCAL_EXTERN - if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype))) { + if (DNS_LOOKUP_LOCAL_EXTERN(name, addr, LWIP_DNS_ADDRTYPE_ARG_OR_ZERO(dns_addrtype)) == ERR_OK) { return ERR_OK; } #endif /* DNS_LOOKUP_LOCAL_EXTERN */ diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 9ff31a4c..e6af1e59 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -884,8 +884,8 @@ * byte order). * * Instead, you can also use an external function: - * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name) - * that returns the IP address or INADDR_NONE if not found. + * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) + * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_* is passed in dns_addrtype). */ #ifndef DNS_LOCAL_HOSTLIST #define DNS_LOCAL_HOSTLIST 0