--- /dev/null
+ o Major features (deprecation):
+ - There's now a "DisableV2DirectoryInfo_" option that prevents us
+ from serving any directory requests for v2 directory information.
+ This is for us to test disabling the old deprecated V2 directory
+ format, so that we can see whether doing so has any effect on
+ network load. Part of a fix for bug 6783.
V(DisableAllSwap, BOOL, "0"),
V(DisableDebuggerAttachment, BOOL, "1"),
V(DisableIOCP, BOOL, "1"),
+ V(DisableV2DirectoryInfo_, BOOL, "1"),
V(DynamicDHGroups, BOOL, "0"),
VPORT(DNSPort, LINELIST, NULL),
V(DNSListenAddress, LINELIST, NULL),
const char *key = url + strlen("/tor/status/");
long lifetime = NETWORKSTATUS_CACHE_LIFETIME;
+ if (options->DisableV2DirectoryInfo_ && !is_v3) {
+ static ratelim_t reject_v2_ratelim = RATELIM_INIT(1800);
+ char *m;
+ write_http_status_line(conn, 404, "Not found");
+ smartlist_free(dir_fps);
+ geoip_note_ns_response(GEOIP_REJECT_NOT_FOUND);
+ if ((m = rate_limit_log(&reject_v2_ratelim, approx_time()))) {
+ log_notice(LD_DIR, "Rejected a v2 networkstatus request.%s", m);
+ tor_free(m);
+ }
+ goto done;
+ }
+
if (!is_v3) {
dirserv_get_networkstatus_v2_fingerprints(dir_fps, key);
if (!strcmpstart(key, "fp/"))
/** Fraction: */
double PathsNeededToBuildCircuits;
+
+ /** Do we serve v2 directory info at all? This is a temporary option, since
+ * we'd like to disable v2 directory serving entirely, but we need a way to
+ * make it temporarily disableable, in order to do fast testing and be
+ * able to turn it back on if it turns out to be non-workable.
+ *
+ * XXXX024 Don't actually leave this in.
+ */
+ int DisableV2DirectoryInfo_;
+
} or_options_t;
/** Persistent state for an onion router, as saved to disk. */