From: Nick Mathewson Date: Sun, 18 Jan 2015 20:28:35 +0000 (-0500) Subject: Merge remote-tracking branch 'public/bug14261_025' X-Git-Tag: tor-0.2.6.3-alpha~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efdac2a68cb17de7c163a9abba05269888aacb88;p=thirdparty%2Ftor.git Merge remote-tracking branch 'public/bug14261_025' Conflicts: src/or/directory.c --- efdac2a68cb17de7c163a9abba05269888aacb88 diff --cc src/or/directory.c index 7b4020080c,50863d0c7e..4f24f84d9c --- a/src/or/directory.c +++ b/src/or/directory.c @@@ -2225,11 -2210,13 +2228,15 @@@ connection_dir_process_inbuf(dir_connec 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: " - "denial of service attempt, or you need to upgrade?"); + log_warn(LD_HTTP, + "Too much data received from directory connection (%s): " + "denial of service attempt, or you need to upgrade?", + conn->base_.address); connection_mark_for_close(TO_CONN(conn)); return -1; }