[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Merge remote-tracking branch 'public/bug14261_025'



commit efdac2a68cb17de7c163a9abba05269888aacb88
Merge: 79e12da ceb6dee
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Sun Jan 18 15:28:35 2015 -0500

    Merge remote-tracking branch 'public/bug14261_025'
    
    Conflicts:
    	src/or/directory.c

 changes/bug14261   |    5 +++++
 src/or/directory.c |    9 ++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --cc src/or/directory.c
index 7b40200,50863d0..4f24f84
--- 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;
    }

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits