summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-03 14:31:31 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-03 14:31:31 -0500
commitdafed84dabbb3afbada5e55ac1d030412418fae5 (patch)
treedf6c051634f497ca35060f0ff119fd6b63098c3e /src/or/config.c
parente82e772f2b1a2b2235d3b3bcde85666e09a182b5 (diff)
downloadtor-dafed84dabbb3afbada5e55ac1d030412418fae5.tar.gz
tor-dafed84dabbb3afbada5e55ac1d030412418fae5.zip
Fixes for bug4645 fix.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/config.c b/src/or/config.c
index a90468dfa7..517ca70ef7 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -2108,22 +2108,22 @@ resolve_my_address(int warn_severity, const or_options_t *options,
if (!explicit_hostname &&
tor_addr_is_internal(&myaddr, 0)) {
- uint32_t interface_ip;
+ tor_addr_t interface_ip;
log_fn(notice_severity, LD_CONFIG, "Guessed local hostname '%s' "
"resolves to a private IP address (%s). Trying something "
"else.", hostname, fmt_addr32(addr));
- if (get_interface_address(warn_severity, &interface_ip)) {
+ if (get_interface_address6(warn_severity, AF_INET, &interface_ip)<0) {
log_fn(warn_severity, LD_CONFIG,
"Could not get local interface IP address. Too bad.");
- } else if (tor_addr_is_internal(&myaddr, 0)) {
+ } else if (tor_addr_is_internal(&interface_ip, 0)) {
log_fn(notice_severity, LD_CONFIG,
"Interface IP address '%s' is a private address too. "
- "Ignoring.", fmt_addr32(interface_ip));
+ "Ignoring.", fmt_addr(&interface_ip));
} else {
from_interface = 1;
- addr = interface_ip;
+ addr = tor_addr_to_ipv4h(&interface_ip);
log_fn(notice_severity, LD_CONFIG,
"Learned IP address '%s' for local interface."
" Using that.", fmt_addr32(addr));