summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c1
-rw-r--r--src/or/main.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 0e15f9bb07..ed436f929f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4267,6 +4267,7 @@ options_transition_allowed(const or_options_t *old,
} \
} while (0)
+ SB_NOCHANGE_STR(Address);
SB_NOCHANGE_STR(PidFile);
SB_NOCHANGE_STR(ServerDNSResolvConfFile);
SB_NOCHANGE_STR(DirPortFrontPage);
diff --git a/src/or/main.c b/src/or/main.c
index 713816d9b7..f37c23c9f5 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -3312,6 +3312,13 @@ do_dump_config(void)
static void
init_addrinfo(void)
{
+ if (! server_mode(get_options()) ||
+ (get_options()->Address && strlen(get_options()->Address) > 0)) {
+ /* We don't need to seed our own hostname, because we won't be calling
+ * resolve_my_address on it.
+ */
+ return;
+ }
char hname[256];
// host name to sandbox