aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-02-22 14:06:28 -0500
committerNick Mathewson <nickm@torproject.org>2011-02-22 14:06:28 -0500
commitcdc59c198a15195a113d68b2c4fbb270792da533 (patch)
treea203f0f49552aaf0b7840534eed3151ff3840708 /src/or/policies.c
parent9d5873cdaedf5bbae50bec08bb0719a1a5be403d (diff)
downloadtor-cdc59c198a15195a113d68b2c4fbb270792da533.tar.gz
tor-cdc59c198a15195a113d68b2c4fbb270792da533.zip
Don't let bad DNS make exit policy and declared exit policy get out of sync
Patch from "postman" on trac. Fixes bg 2366. Bug on 0.1.2.5-alpha.
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 62e048cfc2..38c2f7c0fd 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -858,6 +858,14 @@ policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest,
return 0;
}
+/** Add "reject *:*" to the end of the policy in *<b>dest</b>, allocating
+ * *<b>dest</b> as needed. */
+void
+policies_exit_policy_append_reject_star(smartlist_t **dest)
+{
+ append_exit_policy_string(dest, "reject *:*");
+}
+
/** Replace the exit policy of <b>r</b> with reject *:*. */
void
policies_set_router_exitpolicy_to_reject_all(routerinfo_t *r)