DNS: does not support IPv6, may return a name cased different than the request (when multiple requests are combined to one)

This commit is contained in:
Simon Goldschmidt 2014-09-15 21:56:29 +02:00
parent 9fb46e1206
commit 4b9883a573
3 changed files with 8 additions and 1 deletions

View File

@ -1587,7 +1587,7 @@ lwip_netconn_do_dns_found(const char *name, ip_addr_t *ipaddr, void *arg)
{
struct dns_api_msg *msg = (struct dns_api_msg*)arg;
LWIP_ASSERT("DNS response for wrong host name", strcmp(msg->name, name) == 0);
/* we trust the internal implementation to be correct :-) */
LWIP_UNUSED_ARG(name);
if (ipaddr == NULL) {

View File

@ -278,6 +278,12 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
return EAI_NONAME;
}
if (hints != NULL) {
if ((hints->ai_family != AF_UNSPEC) && (hints->ai_family != AF_INET)) {
return EAI_FAMILY;
}
}
if (servname != NULL) {
/* service name specified: convert to port number
* @todo?: currently, only ASCII integers (port numbers) are supported! */

View File

@ -61,6 +61,7 @@ extern "C" {
#define EAI_SERVICE 201
#define EAI_FAIL 202
#define EAI_MEMORY 203
#define EAI_FAMILY 204
#define HOST_NOT_FOUND 210
#define NO_DATA 211