diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-02-10 16:32:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-02-10 16:32:05 -0500 |
commit | c0a6c3465270355a09a93c1b48ba496e0f36cf0c (patch) | |
tree | 35cbb5d9468da9f81802cb29867da4e288715dff /src | |
parent | 162d2022e1fa4d46480727bae9db650d50c4a21c (diff) | |
parent | 92b1c3b6041d3c760e5351b17d64523965ff99a1 (diff) | |
download | tor-c0a6c3465270355a09a93c1b48ba496e0f36cf0c.tar.gz tor-c0a6c3465270355a09a93c1b48ba496e0f36cf0c.zip |
Merge remote-tracking branch 'teor/bug18208'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 591d4b2366..408f2447c1 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2169,7 +2169,10 @@ got_libevent_error(void) void ip_address_changed(int at_interface) { - int server = server_mode(get_options()); + const or_options_t *options = get_options(); + int server = server_mode(options); + int exit_reject_private = (server && options->ExitRelay + && options->ExitPolicyRejectPrivate); if (at_interface) { if (! server) { @@ -2183,10 +2186,15 @@ ip_address_changed(int at_interface) reset_bandwidth_test(); stats_n_seconds_working = 0; router_reset_reachability(); - mark_my_descriptor_dirty("IP address changed"); } } + /* Exit relays incorporate interface addresses in their exit policies when + * ExitPolicyRejectPrivate is set */ + if (exit_reject_private || (server && !at_interface)) { + mark_my_descriptor_dirty("IP address changed"); + } + dns_servers_relaunch_checks(); } |