diff options
author | Roger Dingledine <arma@torproject.org> | 2013-02-10 16:45:48 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2013-02-11 13:29:56 -0500 |
commit | 92ea0b86de30dafe392a2dcd2eb12d9ab83114a7 (patch) | |
tree | 1cfb1df27350e7750914b3557ce1c811de4bb440 /src/or/config.h | |
parent | dfbb12cabf958f0ff2a1004761c22fc093c73dd0 (diff) | |
download | tor-92ea0b86de30dafe392a2dcd2eb12d9ab83114a7.tar.gz tor-92ea0b86de30dafe392a2dcd2eb12d9ab83114a7.zip |
Refactor resolve_my_address() so logs are more accurate / helpful
It returns the method by which we decided our public IP address
(explicitly configured, resolved from explicit hostname, guessed from
interfaces, learned by gethostname).
Now we can provide more helpful log messages when a relay guesses its IP
address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves
ticket 2267.
While we're at it, stop sending a stray "(null)" in some cases for the
server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.
Diffstat (limited to 'src/or/config.h')
-rw-r--r-- | src/or/config.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/config.h b/src/or/config.h index 8e34655805..e0748a07bf 100644 --- a/src/or/config.h +++ b/src/or/config.h @@ -27,7 +27,8 @@ setopt_err_t options_trial_assign(config_line_t *list, int use_defaults, int clear_first, char **msg); int resolve_my_address(int warn_severity, const or_options_t *options, - uint32_t *addr, char **hostname_out); + uint32_t *addr_out, + const char **method_out, char **hostname_out); int is_local_addr(const tor_addr_t *addr); void options_init(or_options_t *options); char *options_dump(const or_options_t *options, int minimal); |