aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-30 07:36:55 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-30 07:36:55 -0500
commitfac8d40886a03d442ed9f8c18df5ed017b1e6dd0 (patch)
treeebaa6185038792b896ce0f7fc147ef1a67f08599 /src/or/config.c
parentd1e52d9a2a26c1bf9f80b237e692c72517c30495 (diff)
parentb4a8fd895802801198229574c55b3df975aa2244 (diff)
downloadtor-fac8d40886a03d442ed9f8c18df5ed017b1e6dd0.tar.gz
tor-fac8d40886a03d442ed9f8c18df5ed017b1e6dd0.zip
Merge remote-tracking branch 'public/prop227_v2'
Conflicts: src/test/test_dir.c
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index f24b19a388..a0d1346afb 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -86,6 +86,7 @@ static config_abbrev_t option_abbrevs_[] = {
PLURAL(HiddenServiceExcludeNode),
PLURAL(NumCPU),
PLURAL(RendNode),
+ PLURAL(RecommendedPackage),
PLURAL(RendExcludeNode),
PLURAL(StrictEntryNode),
PLURAL(StrictExitNode),
@@ -367,6 +368,7 @@ static config_var_t option_vars_[] = {
V(RecommendedVersions, LINELIST, NULL),
V(RecommendedClientVersions, LINELIST, NULL),
V(RecommendedServerVersions, LINELIST, NULL),
+ V(RecommendedPackages, LINELIST, NULL),
V(RefuseUnknownExits, AUTOBOOL, "auto"),
V(RejectPlaintextPorts, CSV, ""),
V(RelayBandwidthBurst, MEMUNIT, "0"),
@@ -2743,6 +2745,13 @@ options_validate(or_options_t *old_options, or_options_t *options,
"features to be broken in unpredictable ways.");
}
+ for (cl = options->RecommendedPackages; cl; cl = cl->next) {
+ if (! validate_recommended_package_line(cl->value)) {
+ log_warn(LD_CONFIG, "Invalid RecommendedPackage line %s will be ignored",
+ escaped(cl->value));
+ }
+ }
+
if (options->AuthoritativeDir) {
if (!options->ContactInfo && !options->TestingTorNetwork)
REJECT("Authoritative directory servers must set ContactInfo");