mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Merge remote-tracking branch 'public/bug14261_025'
Conflicts: src/or/directory.c
This commit is contained in:
commit
efdac2a68c
5
changes/bug14261
Normal file
5
changes/bug14261
Normal file
@ -0,0 +1,5 @@
|
||||
O Minor bugfixes (directory authority):
|
||||
- Allow directory authorities to fetch more data from one
|
||||
another if they find themselves missing lots of votes.
|
||||
Previously, they had been bumping against the 10 MB queued
|
||||
data limit. Fixes bug 14261. Bugfix on 0.1.2.5-alpha.
|
@ -2201,12 +2201,15 @@ connection_dir_reached_eof(dir_connection_t *conn)
|
||||
*/
|
||||
#define MAX_DIRECTORY_OBJECT_SIZE (10*(1<<20))
|
||||
|
||||
#define MAX_VOTE_DL_SIZE (MAX_DIRECTORY_OBJECT_SIZE * 5)
|
||||
|
||||
/** Read handler for directory connections. (That's connections <em>to</em>
|
||||
* directory servers and connections <em>at</em> directory servers.)
|
||||
*/
|
||||
int
|
||||
connection_dir_process_inbuf(dir_connection_t *conn)
|
||||
{
|
||||
size_t max_size;
|
||||
tor_assert(conn);
|
||||
tor_assert(conn->base_.type == CONN_TYPE_DIR);
|
||||
|
||||
@ -2225,7 +2228,11 @@ connection_dir_process_inbuf(dir_connection_t *conn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (connection_get_inbuf_len(TO_CONN(conn)) > MAX_DIRECTORY_OBJECT_SIZE) {
|
||||
max_size =
|
||||
(TO_CONN(conn)->purpose == DIR_PURPOSE_FETCH_STATUS_VOTE) ?
|
||||
MAX_VOTE_DL_SIZE : MAX_DIRECTORY_OBJECT_SIZE;
|
||||
|
||||
if (connection_get_inbuf_len(TO_CONN(conn)) > max_size) {
|
||||
log_warn(LD_HTTP,
|
||||
"Too much data received from directory connection (%s): "
|
||||
"denial of service attempt, or you need to upgrade?",
|
||||
|
Loading…
Reference in New Issue
Block a user