mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Merge branch 'maint-0.4.7'
This commit is contained in:
commit
ca135a127d
11
changes/bug40698
Normal file
11
changes/bug40698
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
o Minor bugfixes (dirauth):
|
||||||
|
- Directory authorities stop voting a consensus "Measured" weight
|
||||||
|
for relays with the Authority flag. Now these relays will be
|
||||||
|
considered unmeasured, which should reserve their bandwidth
|
||||||
|
for their dir auth role and minimize distractions from other
|
||||||
|
roles. In place of the "Measured" weight, they now include a
|
||||||
|
"MeasuredButAuthority" weight (not used by anything) so the
|
||||||
|
bandwidth authority's opinion on this relay can be recorded for
|
||||||
|
posterity. Lastly, remove the AuthDirDontVoteOnDirAuthBandwidth
|
||||||
|
torrc option which never worked right. Fixes bugs 40698 and 40700;
|
||||||
|
bugfix on 0.4.7.2-alpha.
|
@ -138,7 +138,4 @@ CONF_VAR(VersioningAuthoritativeDirectory, BOOL, 0, "0")
|
|||||||
* pressure or not. */
|
* pressure or not. */
|
||||||
CONF_VAR(AuthDirRejectRequestsUnderLoad, BOOL, 0, "1")
|
CONF_VAR(AuthDirRejectRequestsUnderLoad, BOOL, 0, "1")
|
||||||
|
|
||||||
/** Boolean: Should we not give bandwidth weight measurements to dirauths? */
|
|
||||||
CONF_VAR(AuthDirDontVoteOnDirAuthBandwidth, BOOL, 0, "1")
|
|
||||||
|
|
||||||
END_CONF_STRUCT(dirauth_options_t)
|
END_CONF_STRUCT(dirauth_options_t)
|
||||||
|
@ -2317,8 +2317,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|||||||
smartlist_add_asprintf(chunks, "pr %s\n", chosen_protocol_list);
|
smartlist_add_asprintf(chunks, "pr %s\n", chosen_protocol_list);
|
||||||
}
|
}
|
||||||
/* Now the weight line. */
|
/* Now the weight line. */
|
||||||
if (rs_out.has_bandwidth && (!rs_out.is_authority ||
|
if (rs_out.has_bandwidth) {
|
||||||
!dirauth_get_options()->AuthDirDontVoteOnDirAuthBandwidth)) {
|
|
||||||
char *guardfraction_str = NULL;
|
char *guardfraction_str = NULL;
|
||||||
int unmeasured = rs_out.bw_is_unmeasured;
|
int unmeasured = rs_out.bw_is_unmeasured;
|
||||||
|
|
||||||
|
@ -181,9 +181,20 @@ routerstatus_format_entry(const routerstatus_t *rs, const char *version,
|
|||||||
smartlist_add_asprintf(chunks,
|
smartlist_add_asprintf(chunks,
|
||||||
"w Bandwidth=%d", bw_kb);
|
"w Bandwidth=%d", bw_kb);
|
||||||
|
|
||||||
|
/* Include the bandwidth weight from our external bandwidth
|
||||||
|
* authority, if we have one. */
|
||||||
if (format == NS_V3_VOTE && vrs && vrs->has_measured_bw) {
|
if (format == NS_V3_VOTE && vrs && vrs->has_measured_bw) {
|
||||||
|
if (!rs->is_authority) { /* normal case */
|
||||||
smartlist_add_asprintf(chunks,
|
smartlist_add_asprintf(chunks,
|
||||||
" Measured=%d", vrs->measured_bw_kb);
|
" Measured=%d", vrs->measured_bw_kb);
|
||||||
|
} else {
|
||||||
|
/* dir auth special case: don't give it a Measured line, so we
|
||||||
|
* can reserve its attention for authority-specific activities.
|
||||||
|
* But do include the bwauth's opinion so it can be recorded for
|
||||||
|
* posterity. See #40698 for details. */
|
||||||
|
smartlist_add_asprintf(chunks,
|
||||||
|
" MeasuredButAuthority=%d", vrs->measured_bw_kb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* Write down guardfraction information if we have it. */
|
/* Write down guardfraction information if we have it. */
|
||||||
if (format == NS_V3_VOTE && vrs && vrs->status.has_guardfraction) {
|
if (format == NS_V3_VOTE && vrs && vrs->status.has_guardfraction) {
|
||||||
|
Loading…
Reference in New Issue
Block a user