Commit c15c219e authored by Jason Madden's avatar Jason Madden

Attempt workaround for broken c-ares on Win/Py2

parent 2cfefc91
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
- Upgrade libev from 4.23 to 4.25 and update its embedded - Upgrade libev from 4.23 to 4.25 and update its embedded
``config.guess`` to the latest. ``config.guess`` to the latest.
- Upgrade c-ares from 1.14 to 1.15.
- dnspython >= 1.16.0 is now required for the dnspython resolver. - dnspython >= 1.16.0 is now required for the dnspython resolver.
- Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter. - Python 3.7 subprocess: Copy a ``STARTUPINFO`` passed as a parameter.
......
...@@ -53,6 +53,11 @@ Updating c-ares ...@@ -53,6 +53,11 @@ Updating c-ares
At this point there might be new files in libuv that need added to At this point there might be new files in libuv that need added to
git, evaluate them and add them. git, evaluate them and add them.
- Evaluate whether the release has
https://github.com/c-ares/c-ares/issues/246 fixed. If not, ``git
apply cares-win32.patch``. If so, then delete that file and this
part of the instructions.
- Follow the same 'config.guess' and 'config.sub' steps as libev. - Follow the same 'config.guess' and 'config.sub' steps as libev.
......
...@@ -346,10 +346,6 @@ static int file_lookup(const char *name, int family, struct hostent **host) ...@@ -346,10 +346,6 @@ static int file_lookup(const char *name, int family, struct hostent **host)
int status; int status;
int error; int error;
/* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
if (ares__is_onion_domain(name))
return ARES_ENOTFOUND;
#ifdef WIN32 #ifdef WIN32
char PATH_HOSTS[MAX_PATH]; char PATH_HOSTS[MAX_PATH];
win_platform platform; win_platform platform;
...@@ -387,6 +383,10 @@ static int file_lookup(const char *name, int family, struct hostent **host) ...@@ -387,6 +383,10 @@ static int file_lookup(const char *name, int family, struct hostent **host)
return ARES_ENOTFOUND; return ARES_ENOTFOUND;
#endif #endif
/* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
if (ares__is_onion_domain(name))
return ARES_ENOTFOUND;
fp = fopen(PATH_HOSTS, "r"); fp = fopen(PATH_HOSTS, "r");
if (!fp) if (!fp)
{ {
......
diff --git a/deps/c-ares/ares_gethostbyname.c b/deps/c-ares/ares_gethostbyname.c
index 8187746b..fb73826b 100644
--- a/deps/c-ares/ares_gethostbyname.c
+++ b/deps/c-ares/ares_gethostbyname.c
@@ -346,10 +346,6 @@ static int file_lookup(const char *name, int family, struct hostent **host)
int status;
int error;
- /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
- if (ares__is_onion_domain(name))
- return ARES_ENOTFOUND;
-
#ifdef WIN32
char PATH_HOSTS[MAX_PATH];
win_platform platform;
@@ -387,6 +383,10 @@ static int file_lookup(const char *name, int family, struct hostent **host)
return ARES_ENOTFOUND;
#endif
+ /* Per RFC 7686, reject queries for ".onion" domain names with NXDOMAIN. */
+ if (ares__is_onion_domain(name))
+ return ARES_ENOTFOUND;
+
fp = fopen(PATH_HOSTS, "r");
if (!fp)
{
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment