diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2008-09-11 20:06:04 +0000 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2008-09-11 20:06:04 +0000 |
commit | f0a5ef804f4ce09fb8daa79aa23a57ccf65296e4 (patch) | |
tree | 58f3fc243b864bc2ef7ad43ad17405914844d433 /src/or | |
parent | 535e2074bc0929071f9063ac723feb90131dc4ce (diff) | |
download | tor-f0a5ef804f4ce09fb8daa79aa23a57ccf65296e4.tar.gz tor-f0a5ef804f4ce09fb8daa79aa23a57ccf65296e4.zip |
Directory mirrors store and serve v2 hidden service descriptors by default.
svn:r16858
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 5 | ||||
-rw-r--r-- | src/or/router.c | 3 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c index 92a4a0dbeb..bb729da9b7 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -219,7 +219,7 @@ static config_var_t _option_vars[] = { V(Group, STRING, NULL), V(HardwareAccel, BOOL, "0"), V(HashedControlPassword, LINELIST, NULL), - V(HidServDirectoryV2, BOOL, "0"), + V(HidServDirectoryV2, BOOL, "1"), VAR("HiddenServiceDir", LINELIST_S, RendConfigLines, NULL), OBSOLETE("HiddenServiceExcludeNodes"), OBSOLETE("HiddenServiceNodes"), @@ -3022,9 +3022,6 @@ options_validate(or_options_t *old_options, or_options_t *options, REJECT("HSAuthorityRecordStats is set but we're not running as " "a hidden service authority."); - if (options->HidServDirectoryV2 && !options->DirPort) - REJECT("Running as hidden service directory, but no DirPort set."); - if (options->ConnLimit <= 0) { r = tor_snprintf(buf, sizeof(buf), "ConnLimit must be greater than 0, but was set to %d", diff --git a/src/or/router.c b/src/or/router.c index 1132f9dca5..18e8abcfe1 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1702,7 +1702,8 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, onion_pkey, identity_pkey, family_line, we_are_hibernating() ? "opt hibernating 1\n" : "", - options->HidServDirectoryV2 ? "opt hidden-service-dir\n" : ""); + (options->DirPort && options->HidServDirectoryV2) ? + "opt hidden-service-dir\n" : ""); tor_free(family_line); tor_free(onion_pkey); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 0e4df84aae..32595b8080 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4936,7 +4936,7 @@ hid_serv_acting_as_directory(void) routerstatus_t *rs; if (!me) return 0; - if (!get_options()->HidServDirectoryV2) { + if (!get_options()->DirPort || !get_options()->HidServDirectoryV2) { log_info(LD_REND, "We are not acting as hidden service directory, " "because we have not been configured as such."); return 0; |