-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticket33072 042 01 #1858
base: maint-0.4.2
Are you sure you want to change the base?
Ticket33072 042 01 #1858
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
o Minor bugfix (directory authority): | ||
- Always allow compressed directory requests and introduce option | ||
AuthDirRejectUncompressedRequests to control that behavior. Fixes bug | ||
33072; bugfix on 0.1.2.5-alpha. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ problem dependency-violation /src/core/crypto/onion_crypto.c 5 | |
problem dependency-violation /src/core/crypto/onion_fast.c 1 | ||
problem dependency-violation /src/core/crypto/onion_tap.c 3 | ||
problem dependency-violation /src/core/crypto/relay_crypto.c 9 | ||
problem file-size /src/core/mainloop/connection.c 5569 | ||
problem file-size /src/core/mainloop/connection.c 5694 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, you shouldn't need to fix practracker on 0.4.2 or 0.4.3. I have removed check-best-practices from check-local on all maint and release branches. So practracker only runs by default on master. |
||
problem include-count /src/core/mainloop/connection.c 62 | ||
problem function-size /src/core/mainloop/connection.c:connection_free_minimal() 185 | ||
problem function-size /src/core/mainloop/connection.c:connection_listener_new() 324 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3190,8 +3190,11 @@ connection_bucket_write_limit(connection_t *conn, time_t now) | |
* shouldn't send <b>attempt</b> bytes of low-priority directory stuff | ||
* out to <b>conn</b>. | ||
* | ||
* If we are a directory authority, always answer dir requests thus true is | ||
* always returned. | ||
* If we are a directory authority, false is returned (indicating that we | ||
* should answer the request) if one of these conditions is met: | ||
* - Connection is from a known relay (address is looked up). | ||
* - AuthDirRejectRequestsUnderLoad is set to 0. | ||
* - Compression is being used for the request (looking at c_method). | ||
Comment on lines
+3193
to
+3197
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment doesn't match what the function does in 0.4.3. |
||
* | ||
* Note: There are a lot of parameters we could use here: | ||
* - global_relayed_write_bucket. Low is bad. | ||
|
@@ -3206,14 +3209,25 @@ connection_bucket_write_limit(connection_t *conn, time_t now) | |
* that's harder to quantify and harder to keep track of. | ||
*/ | ||
bool | ||
connection_dir_is_global_write_low(const connection_t *conn, size_t attempt) | ||
connection_dir_is_global_write_low(const connection_t *conn, size_t attempt, | ||
const compress_method_t c_method) | ||
{ | ||
size_t smaller_bucket = | ||
MIN(token_bucket_rw_get_write(&global_bucket), | ||
token_bucket_rw_get_write(&global_relayed_bucket)); | ||
|
||
/* Special case for authorities (directory only). */ | ||
if (authdir_mode_v3(get_options())) { | ||
/* If this requests is uncompressed and we are configured to reject those, | ||
* indicate that have reached the limit thus deny answering. */ | ||
if (c_method == NO_METHOD && | ||
get_options()->AuthDirRejectUncompressedRequests) { | ||
return true; | ||
} | ||
if (c_method != NO_METHOD) { | ||
/* Always answer compressed request. */ | ||
return false; | ||
} | ||
Comment on lines
+3227
to
+3230
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is missing in 0.4.3, but present in 0.4.2 and master. Did you forget to delete it in 0.4.2 and master? |
||
/* Are we configured to possibly reject requests under load? */ | ||
if (!get_options()->AuthDirRejectRequestsUnderLoad) { | ||
/* Answer request no matter what. */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the changes file is out of sync as well.
We let AuthDirRejectRequestsUnderLoad and the bandwidth buckets decide about compressed requests.