diff options
author | Neel Chauhan <neel@neelc.org> | 2019-04-11 20:21:51 -0400 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2019-04-14 12:48:07 -0400 |
commit | 5cad9fb4776979285596c4b26230683de6bb84c6 (patch) | |
tree | 03e2e0e00c25ed033cb838dd57eb6993c1f4d20f | |
parent | 7b386f2356c9c706e9432b19058dee8147030056 (diff) | |
download | tor-5cad9fb4776979285596c4b26230683de6bb84c6.tar.gz tor-5cad9fb4776979285596c4b26230683de6bb84c6.zip |
Become an exit relay if IPv6Exit is 1
-rw-r--r-- | src/core/or/policies.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/or/policies.c b/src/core/or/policies.c index a6d66d36de..ab320dd2ca 100644 --- a/src/core/or/policies.c +++ b/src/core/or/policies.c @@ -1182,9 +1182,9 @@ validate_addr_policies(const or_options_t *options, char **msg) static int warned_about_nonexit = 0; - if (public_server_mode(options) && - !warned_about_nonexit && options->ExitPolicy == NULL && - options->ExitRelay == -1 && options->ReducedExitPolicy == 0) { + if (public_server_mode(options) && !warned_about_nonexit && + options->ExitPolicy == NULL && options->ExitRelay == -1 && + options->ReducedExitPolicy == 0 && options->IPv6Exit == 0) { warned_about_nonexit = 1; log_notice(LD_CONFIG, "By default, Tor does not run as an exit relay. " "If you want to be an exit relay, " @@ -2142,8 +2142,9 @@ policies_parse_exit_policy_from_options(const or_options_t *or_options, /* Short-circuit for non-exit relays, or for relays where we didn't specify * ExitPolicy or ReducedExitPolicy and ExitRelay is auto. */ - if (or_options->ExitRelay == 0 || (or_options->ExitPolicy == NULL && - or_options->ExitRelay == -1 && or_options->ReducedExitPolicy == 0)) { + if (or_options->ExitRelay == 0 || + (or_options->ExitPolicy == NULL && or_options->ExitRelay == -1 && + or_options->ReducedExitPolicy == 0 && or_options->IPv6Exit == 0)) { append_exit_policy_string(result, "reject *4:*"); append_exit_policy_string(result, "reject *6:*"); return 0; |