torproject / tor Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#21900: Fallback to local DNS when no other nameservers are known #273
Conversation
src/feature/relay/dns.c
Outdated
| return 0; | ||
| } | ||
|
|
||
| if (st.st_size == 0) |
If the stat() call failed above, then at this point, st.st_size will be uninitialized, and we're not allowed to look at it.
src/feature/relay/dns.c
Outdated
| #endif /* defined(dns_option_hostsfile) && defined(use_libseccomp) */ | ||
|
|
||
| if (!missing_resolv_conf) { | ||
| log_info(LD_EXIT, "parsing resolver configuration in '%s'", conf_fname); |
It looks like this log message, and the messages after it, are still lower-cased in the latest version of the branch?
src/feature/relay/dns.c
Outdated
| resolv_conf_fname = tor_strdup(conf_fname); | ||
| resolv_conf_mtime = st.st_mtime; | ||
| } else { | ||
| log_warn(LD_EXIT, "Could not read your resolv.conf - " |
This message should say what actual filename it tried to read.
src/feature/relay/dns.c
Outdated
| } | ||
|
|
||
| tor_free(resolv_conf_fname); |
This tor_free() here will clear the value of rsolv_conf_fname that you set above...
| log_warn(LD_EXIT, "unable to find any nameservers in '%s'.", | ||
| conf_fname); | ||
| } | ||
| resolv_conf_fname = tor_strdup(conf_fname); |
If resolv_conf_fname was already set, this will leak memory
…_addr() is not available
|
Closing in favor of PR 425 |
https://trac.torproject.org/projects/tor/ticket/21900
The text was updated successfully, but these errors were encountered: