diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-02-01 17:33:19 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-02-01 17:58:15 +0100 |
commit | 6aed61f1cad0a267d9fdc75f90381fdfb4491e8c (patch) | |
tree | 99e2bf7d46946047109f434bba84ee1d48d4d755 | |
parent | a6c18472cd31c1367dd85ca0d864b1136027811b (diff) | |
download | node-6aed61f1cad0a267d9fdc75f90381fdfb4491e8c.tar.gz |
dns, cares: don't filter NOTIMP, REFUSED, SERVFAIL
Report the aforementioned DNS server failure codes as-is, stop c-ares
from reporting them as ARES_ECONNREFUSED.
Reported by Steve Freegard.
-rw-r--r-- | src/cares_wrap.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 79dafe1e4..8dce800b4 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -886,11 +886,15 @@ static void Initialize(Handle<Object> target) { assert(r == ARES_SUCCESS); struct ares_options options; + memset(&options, 0, sizeof(options)); + options.flags = ARES_FLAG_NOCHECKRESP; options.sock_state_cb = ares_sockstate_cb; options.sock_state_cb_data = uv_default_loop(); /* We do the call to ares_init_option for caller. */ - r = ares_init_options(&ares_channel, &options, ARES_OPT_SOCK_STATE_CB); + r = ares_init_options(&ares_channel, + &options, + ARES_OPT_FLAGS | ARES_OPT_SOCK_STATE_CB); assert(r == ARES_SUCCESS); /* Initialize the timeout timer. The timer won't be started until the */ |