mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
Fixed bug #26657: DNS, if host name is "localhost", result is error.
This commit is contained in:
parent
dea7255fc5
commit
8bf57c0e14
@ -25,6 +25,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2009-08-23 Simon Goldschmidt
|
||||||
|
* netdb.c, dns.c: bug #26657: DNS, if host name is "localhost", result
|
||||||
|
is error.
|
||||||
|
|
||||||
2009-08-23 Simon Goldschmidt
|
2009-08-23 Simon Goldschmidt
|
||||||
* opt.h, init.c: bug #26649: TCP fails when TCP_MSS > TCP_SND_BUF
|
* opt.h, init.c: bug #26649: TCP fails when TCP_MSS > TCP_SND_BUF
|
||||||
Fixed wrong parenthesis, added check in init.c
|
Fixed wrong parenthesis, added check in init.c
|
||||||
|
@ -300,7 +300,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* service location specified, use loopback address */
|
/* service location specified, use loopback address */
|
||||||
addr.addr = INADDR_LOOPBACK;
|
addr.addr = htonl(INADDR_LOOPBACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
ai = mem_malloc(sizeof(struct addrinfo));
|
ai = mem_malloc(sizeof(struct addrinfo));
|
||||||
|
@ -961,7 +961,7 @@ dns_gethostbyname(const char *hostname, struct ip_addr *addr, dns_found_callback
|
|||||||
|
|
||||||
#if LWIP_HAVE_LOOPIF
|
#if LWIP_HAVE_LOOPIF
|
||||||
if (strcmp(hostname,"localhost")==0) {
|
if (strcmp(hostname,"localhost")==0) {
|
||||||
addr->addr = INADDR_LOOPBACK;
|
addr->addr = htonl(INADDR_LOOPBACK);
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
#endif /* LWIP_HAVE_LOOPIF */
|
#endif /* LWIP_HAVE_LOOPIF */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user