aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-09-17 22:22:05 +0000
committerRoger Dingledine <arma@torproject.org>2007-09-17 22:22:05 +0000
commit8f75defd337961f221c939f3914c96b3b683e4cf (patch)
tree3a8336efbf8ff0610be389fb9d9e3ad4c0470271 /src/or/router.c
parent9966a11b4dcbbaaa6b5fe5ebdd7b405a2c2042ab (diff)
downloadtor-8f75defd337961f221c939f3914c96b3b683e4cf.tar
tor-8f75defd337961f221c939f3914c96b3b683e4cf.tar.gz
Servers used to decline to publish their DirPort if their
BandwidthRate, RelayBandwidthRate, or MaxAdvertisedBandwidth were below a threshold. Now they only look at BandwidthRate and RelayBandwidthRate. svn:r11465
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 794f5473e..9e85d7755 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -619,7 +619,10 @@ decide_to_advertise_dirport(or_options_t *options, routerinfo_t *router)
/* if we might potentially hibernate */
new_choice = 0;
reason = "AccountingMax enabled";
- } else if (router->bandwidthrate < 51200) {
+#define MIN_BW_TO_ADVERTISE_DIRPORT 51200
+ } else if (options->BandwidthRate < MIN_BW_TO_ADVERTISE_DIRPORT ||
+ (options->RelayBandwidthRate > 0 &&
+ options->RelayBandwidthRate < MIN_BW_TO_ADVERTISE_DIRPORT)) {
/* if we're advertising a small amount */
new_choice = 0;
reason = "BandwidthRate under 50KB";