diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/resolve_addr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/app/config/resolve_addr.c b/src/app/config/resolve_addr.c index bf462c2024..167a4aa4dd 100644 --- a/src/app/config/resolve_addr.c +++ b/src/app/config/resolve_addr.c @@ -193,6 +193,10 @@ get_address_from_config(const or_options_t *options, int warn_severity, explicit_ip = true; num_valid_addr++; continue; + } else if (af != -1) { + /* Parsable address but just not the one from the family we want. Skip + * it so we don't attempt a resolve. */ + continue; } /* Not an IP address. Considering this value a hostname and attempting to @@ -208,7 +212,7 @@ get_address_from_config(const or_options_t *options, int warn_severity, /* Hostname that can't be resolved, this is a fatal error. */ log_fn(warn_severity, LD_CONFIG, "Could not resolve local Address '%s'. Failing.", cfg->value); - return FN_RET_BAIL; + continue; } } @@ -216,8 +220,10 @@ get_address_from_config(const or_options_t *options, int warn_severity, log_fn(warn_severity, LD_CONFIG, "No Address option found for family %s in configuration.", fmt_af_family(family)); - /* No Address statement for family, inform caller to try next method. */ - return FN_RET_NEXT; + /* No Address statement for family but one exists since Address is not + * NULL thus we have to stop now and not attempt to send back a guessed + * address. */ + return FN_RET_BAIL; } if (num_valid_addr >= MAX_CONFIG_ADDRESS) { |