]> git.meshlink.io Git - meshlink/commitdiff
Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 26 Feb 2012 15:27:13 +0000 (16:27 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 26 Feb 2012 15:27:13 +0000 (16:27 +0100)
1  2 
src/net_packet.c

index 64b0f8e8490adb7d5f0a06c2c99f6fcf39db2e64,4b3496d38ea3572155c5c52c976aa15fb7b64205..870f9858f3e6d9d6643bdddbaa3116d2d7edaec7
@@@ -137,9 -136,12 +137,12 @@@ static void send_mtu_probe_handler(int 
                        len = 64;
                
                memset(packet.data, 0, 14);
 -              RAND_pseudo_bytes(packet.data + 14, len - 14);
 +              randomize(packet.data + 14, len - 14);
                packet.len = len;
-               packet.priority = i < 3 ? 0 : -1;
+               if(i >= 3 && n->mtuprobes <= 10)
+                       packet.priority = -1;
+               else
+                       packet.priority = 0;
  
                ifdebug(TRAFFIC) logger(LOG_INFO, "Sending MTU probe length %d to %s (%s)", len, n->name, n->hostname);