]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix: when BridgeRelay is set, you do not get any exit policy.
authorNick Mathewson <nickm@torproject.org>
Tue, 31 Oct 2017 17:10:17 +0000 (13:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 31 Oct 2017 17:25:41 +0000 (13:25 -0400)
src/or/policies.c

index 3ff2b4aa3b20e327ceba6e6243d029788768be1f..0dfbd92097d62fcd037d6d246062f3c8cdcd7f2e 100644 (file)
@@ -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) {