summaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-06-24 15:12:57 -0400
committerNick Mathewson <nickm@torproject.org>2020-06-24 15:25:34 -0400
commitedb023b1e74dd3b900af399126bd985fc4064857 (patch)
treea40593ce97d20070ac79fe5dd557832b03e6b607 /src/app/config/config.c
parent6edf7f6710600962f95e7f5458787dbc5e5c7411 (diff)
downloadtor-edb023b1e74dd3b900af399126bd985fc4064857.tar.gz
tor-edb023b1e74dd3b900af399126bd985fc4064857.zip
Add an AssumeReachableIPv6 autobool option.
This option tells Tor that our IPv6 orport is reachable, and doesn't need to be checked. Closes the rest of 33224.
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 286cd9304a..7878fa9de0 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -323,6 +323,7 @@ static const config_var_t option_vars_[] = {
V(AlternateDirAuthority, LINELIST, NULL),
OBSOLETE("AlternateHSAuthority"),
V(AssumeReachable, BOOL, "0"),
+ V(AssumeReachableIPv6, AUTOBOOL, "auto"),
OBSOLETE("AuthDirBadDir"),
OBSOLETE("AuthDirBadDirCCs"),
V(AuthDirBadExit, LINELIST, NULL),
@@ -3229,6 +3230,10 @@ options_validate_cb(const void *old_options_, void *options_, char **msg)
REJECT("TokenBucketRefillInterval must be between 1 and 1000 inclusive.");
}
+ if (options->AssumeReachable && options->AssumeReachableIPv6 == 0) {
+ REJECT("Cannot set AssumeReachable 1 and AssumeReachableIPv6 0.");
+ }
+
if (options->ExcludeExitNodes || options->ExcludeNodes) {
options->ExcludeExitNodesUnion_ = routerset_new();
routerset_union(options->ExcludeExitNodesUnion_,options->ExcludeExitNodes);