|
@@ -970,6 +970,7 @@ router_new_address_suggestion(const char *suggestion)
|
|
|
{
|
|
|
uint32_t addr, cur;
|
|
|
struct in_addr in;
|
|
|
+ or_options_t *options = get_options();
|
|
|
|
|
|
/* first, learn what the IP address actually is */
|
|
|
if (!tor_inet_aton(suggestion, &in)) {
|
|
@@ -980,7 +981,8 @@ router_new_address_suggestion(const char *suggestion)
|
|
|
|
|
|
log_debug(LD_DIR, "Got X-Your-Address-Is: %s.", suggestion);
|
|
|
|
|
|
- if (resolve_my_address(LOG_INFO, get_options(), &cur, NULL) >= 0) {
|
|
|
+ if (!server_mode(options) ||
|
|
|
+ resolve_my_address(LOG_INFO, options, &cur, NULL) >= 0) {
|
|
|
/* We're all set -- we already know our address. Great. */
|
|
|
last_guessed_ip = cur; /* store it in case we need it later */
|
|
|
return;
|