diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-10-25 00:20:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-14 23:16:22 -0500 |
commit | 9016d9e8294a35295851d12b62de4ac9a5549709 (patch) | |
tree | 028df65c0b01db32661f0389726d033130bfade9 /src/or/policies.c | |
parent | c3faa0ebd55f7de80db1a3aa5e64a79c72708722 (diff) | |
download | tor-9016d9e8294a35295851d12b62de4ac9a5549709.tar.gz tor-9016d9e8294a35295851d12b62de4ac9a5549709.zip |
Add an IPv6Exit configuration option
Don't advertise an IPv6 exit policy, or accept IPv6 exit requests,
if IPv6Exit is not true.
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 16b3e4fa7a..f9646f8f61 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -437,6 +437,7 @@ validate_addr_policies(const or_options_t *options, char **msg) *msg = NULL; if (policies_parse_exit_policy(options->ExitPolicy, &addr_policy, + options->IPv6Exit, options->ExitPolicyRejectPrivate, NULL, !options->BridgeRelay)) REJECT("Error in ExitPolicy entry."); @@ -938,9 +939,13 @@ exit_policy_remove_redundancies(smartlist_t *dest) */ int policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest, + int ipv6_exit, int rejectprivate, const char *local_address, int add_default_policy) { + if (!ipv6_exit) { + append_exit_policy_string(dest, "reject *6:*"); + } if (rejectprivate) { append_exit_policy_string(dest, "reject private:*"); if (local_address) { |