summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-06-13 09:16:09 +0000
committerRoger Dingledine <arma@torproject.org>2006-06-13 09:16:09 +0000
commit31b51849b50904e2206f59832bd86217c662dbd8 (patch)
tree5602436a16a6b9c3275e70437b440a83db8e45c6 /src/or/policies.c
parent279e86f3c88b19ae4a65140567151c183def5931 (diff)
downloadtor-31b51849b50904e2206f59832bd86217c662dbd8.tar.gz
tor-31b51849b50904e2206f59832bd86217c662dbd8.zip
export the default exit policy via the control port, so controllers
don't need to guess what it is / will be later. svn:r6615
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 7eff70fc90..31622a0120 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -627,6 +627,18 @@ exit_policy_is_general_exit(addr_policy_t *policy)
return n_allowed >= 2;
}
+int
+policies_getinfo_helper(const char *question, char **answer)
+{
+ if (!strcmp(question, "exit-policy/default")) {
+ *answer = tor_strdup(DEFAULT_EXIT_POLICY);
+// } else if (!strcmp(question, "exit-policy/prepend")) {
+ } else {
+ *answer = NULL;
+ }
+ return 0;
+}
+
/** Release all storage held by <b>p</b> */
void
addr_policy_free(addr_policy_t *p)