Bug 1057096 - Double the global STUN long-term rate limit. r=jesup
authorByron Campen [:bwc] <docfaraday@gmail.com>
Thu, 21 Aug 2014 15:35:04 -0700
changeset 201667 912de3bb85ce46bfbdf0a8df90a6d8b96fd7670c
parent 201666 2e86e0ecbd89d724d896aa9538f181cf1b17b05d
child 201668 123d4bd5a50bf17aabcea469b0eb70be5ad04fe5
push id27375
push userryanvm@gmail.com
push dateTue, 26 Aug 2014 19:56:59 +0000
treeherdermozilla-central@f9bfe115fee5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1057096
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057096 - Double the global STUN long-term rate limit. r=jesup
media/mtransport/nr_socket_prsock.cpp
--- a/media/mtransport/nr_socket_prsock.cpp
+++ b/media/mtransport/nr_socket_prsock.cpp
@@ -514,18 +514,18 @@ int NrSocket::sendto(const void *msg, si
     ABORT(R_EOD);
 
   if (nr_is_stun_request_message((UCHAR*)msg, len)) {
     // Global rate limiting for stun requests, to mitigate the ice hammer DoS
     // (see http://tools.ietf.org/html/draft-thomson-mmusic-ice-webrtc)
 
     // Tolerate rate of 8k/sec, for one second.
     static SimpleTokenBucket burst(16384*1, 16384);
-    // Tolerate rate of 3.6k/sec over twenty seconds.
-    static SimpleTokenBucket sustained(3686*20, 3686);
+    // Tolerate rate of 7.2k/sec over twenty seconds.
+    static SimpleTokenBucket sustained(7372*20, 7372);
 
     // Check number of tokens in each bucket.
     if (burst.getTokens(UINT32_MAX) < len) {
       r_log(LOG_GENERIC, LOG_ERR,
                  "Short term global rate limit for STUN requests exceeded.");
 #ifdef MOZILLA_INTERNAL_API
       nr_socket_short_term_violation_time = TimeStamp::Now();
 #endif