commit 5cad9fb4776979285596c4b26230683de6bb84c6 Author: Neel Chauhan neel@neelc.org Date: Thu Apr 11 20:21:51 2019 -0400
Become an exit relay if IPv6Exit is 1 --- src/core/or/policies.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/core/or/policies.c b/src/core/or/policies.c index a6d66d36d..ab320dd2c 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;
tor-commits@lists.torproject.org