[tor-commits] [tor/master] Fix: when BridgeRelay is set, you do not get any exit policy.

nickm at torproject.org nickm at torproject.org
Tue Oct 31 17:51:29 UTC 2017


commit 6e2f8de62d8e4ba440ae37e091651f075a0bf665
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Oct 31 13:10:17 2017 -0400

    Fix: when BridgeRelay is set, you do not get any exit policy.
---
 src/or/policies.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/or/policies.c b/src/or/policies.c
index 3ff2b4aa3..0dfbd9209 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -2118,12 +2118,11 @@ policies_parse_exit_policy_from_options(const or_options_t *or_options,
     parser_cfg |= EXIT_POLICY_REJECT_PRIVATE;
   }
 
-  if (!or_options->BridgeRelay && !or_options->ReducedExitPolicy) {
-    parser_cfg |= EXIT_POLICY_ADD_DEFAULT;
-  }
-
-  if (or_options->ReducedExitPolicy) {
-    parser_cfg |= EXIT_POLICY_ADD_REDUCED;
+  if (!or_options->BridgeRelay) {
+    if (or_options->ReducedExitPolicy)
+      parser_cfg |= EXIT_POLICY_ADD_REDUCED;
+    else
+      parser_cfg |= EXIT_POLICY_ADD_DEFAULT;
   }
 
   if (or_options->ExitPolicyRejectLocalInterfaces) {





More information about the tor-commits mailing list