diff --git a/sys/include/net/sock/dns.h b/sys/include/net/sock/dns.h index 8bf2a1da86..f7d4d82261 100644 --- a/sys/include/net/sock/dns.h +++ b/sys/include/net/sock/dns.h @@ -80,8 +80,8 @@ typedef struct { * @param[out] addr_out buffer to write result into * @param[in] family Either AF_INET, AF_INET6 or AF_UNSPEC * - * @return 0 on success - * @return !=0 otherwise + * @return the size of the resolved address on success + * @return < 0 otherwise */ int sock_dns_query(const char *domain_name, void *addr_out, int family); diff --git a/sys/shell/commands/sc_gnrc_icmpv6_echo.c b/sys/shell/commands/sc_gnrc_icmpv6_echo.c index f07516aaa3..b93491a6d1 100644 --- a/sys/shell/commands/sc_gnrc_icmpv6_echo.c +++ b/sys/shell/commands/sc_gnrc_icmpv6_echo.c @@ -178,7 +178,7 @@ static int _configure(int argc, char **argv, _ping_data_t *data) data->hostname = arg; #ifdef MODULE_SOCK_DNS if (strchr(data->hostname, ':') == NULL && - sock_dns_query(data->hostname, &data->host, AF_INET6) == 0) { + sock_dns_query(data->hostname, &data->host, AF_INET6) > 0) { res = 0; continue; }