Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
dns, cares: don't filter NOTIMP, REFUSED, SERVFAIL
Browse files Browse the repository at this point in the history
Report the aforementioned DNS server failure codes as-is, stop c-ares
from reporting them as ARES_ECONNREFUSED.

Reported by Steve Freegard.
  • Loading branch information
bnoordhuis committed Feb 1, 2013
1 parent a6c1847 commit 6aed61f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cares_wrap.cc
Expand Up @@ -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 */
Expand Down

0 comments on commit 6aed61f

Please sign in to comment.