mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
r11944@catbus: nickm | 2007-02-25 14:43:18 -0500
Add a lower-bound on MaxAdvertisedBandwidth. svn:r9652
This commit is contained in:
parent
938de88e3b
commit
333bf44471
@ -102,6 +102,7 @@ Changes in version 0.1.2.8-rc - 2007-02-??
|
|||||||
- Always remove expired routers and networkstatus docs before checking
|
- Always remove expired routers and networkstatus docs before checking
|
||||||
whether we have enough information to build circuits. (Fixes
|
whether we have enough information to build circuits. (Fixes
|
||||||
bug 373.)
|
bug 373.)
|
||||||
|
- Put a lower-bound on MaxAdvertisedBandwidth.
|
||||||
|
|
||||||
|
|
||||||
Changes in version 0.1.2.7-alpha - 2007-02-06
|
Changes in version 0.1.2.7-alpha - 2007-02-06
|
||||||
|
@ -2647,8 +2647,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
*msg = tor_strdup(r >= 0 ? buf : "internal error");
|
*msg = tor_strdup(r >= 0 ? buf : "internal error");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (server_mode(options) &&
|
if (server_mode(options)) {
|
||||||
options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH*2) {
|
if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH*2) {
|
||||||
r = tor_snprintf(buf, sizeof(buf),
|
r = tor_snprintf(buf, sizeof(buf),
|
||||||
"BandwidthRate is set to %d bytes/second. "
|
"BandwidthRate is set to %d bytes/second. "
|
||||||
"For servers, it must be at least %d.",
|
"For servers, it must be at least %d.",
|
||||||
@ -2656,7 +2656,18 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
ROUTER_REQUIRED_MIN_BANDWIDTH*2);
|
ROUTER_REQUIRED_MIN_BANDWIDTH*2);
|
||||||
*msg = tor_strdup(r >= 0 ? buf : "internal error");
|
*msg = tor_strdup(r >= 0 ? buf : "internal error");
|
||||||
return -1;
|
return -1;
|
||||||
|
} else if (options->MaxAdvertisedBandwidth <
|
||||||
|
ROUTER_REQUIRED_MIN_BANDWIDTH) {
|
||||||
|
r = tor_snprintf(buf, sizeof(buf),
|
||||||
|
"MaxAdvertisedBandwidth is set to %d bytes/second. "
|
||||||
|
"For servers, it must be at least %d.",
|
||||||
|
(int)options->MaxAdvertisedBandwidth,
|
||||||
|
ROUTER_REQUIRED_MIN_BANDWIDTH);
|
||||||
|
*msg = tor_strdup(r >= 0 ? buf : "internal error");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (options->BandwidthRate > options->BandwidthBurst)
|
if (options->BandwidthRate > options->BandwidthBurst)
|
||||||
REJECT("BandwidthBurst must be at least equal to BandwidthRate.");
|
REJECT("BandwidthBurst must be at least equal to BandwidthRate.");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user