summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-05-13 18:14:29 +0200
committerNick Mathewson <nickm@torproject.org>2009-05-13 16:45:59 -0400
commit9e97067b2fc4032bce658d73cf21ee54573186bb (patch)
tree03027a0f3cfec100874e5a493383ede17cfd876d
parentfc091e8a96f2e2db9516f4046bec63f1e17a8f71 (diff)
downloadtor-9e97067b2fc4032bce658d73cf21ee54573186bb.tar.gz
tor-9e97067b2fc4032bce658d73cf21ee54573186bb.zip
Prevent bridges from publishing router descriptors.
Bridges are not supposed to publish router descriptors to the directory authorities. It defeats the point of bridges when they are included in the public relay directory. This patch puts out a warning and exits when the node is configured as a bridge and to publish v1, v2, or v3 descriptors at the same time. Also fixes part of bug 932.
-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 3d757c1bbb..7c1b60dcf4 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3238,6 +3238,15 @@ options_validate(or_options_t *old_options, or_options_t *options,
return -1;
}
+ if ((options->BridgeRelay
+ || options->_PublishServerDescriptor & BRIDGE_AUTHORITY)
+ && options->_PublishServerDescriptor
+ & (V1_AUTHORITY + V2_AUTHORITY + V3_AUTHORITY)) {
+ REJECT("Bridges are not supposed to publish router descriptors to the "
+ "directory authorities. Please correct your "
+ "PublishServerDescriptor line.");
+ }
+
if (options->MinUptimeHidServDirectoryV2 < 0) {
log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at "
"least 0 seconds. Changing to 0.");