mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
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:
parent
9fb46e1206
commit
4b9883a573
@ -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) {
|
||||
|
@ -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! */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user