]> git.meshlink.io Git - meshlink/commitdiff
Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 25 Feb 2012 21:52:57 +0000 (22:52 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 25 Feb 2012 21:52:57 +0000 (22:52 +0100)
1  2 
src/route.c

diff --cc src/route.c
index 32be4dec404f06c2fffe6e53ef7c699343d064d0,666f48f6b4631d32e5021d1428bc8b607517f658..c73ac9f2e5374c9aaba874bdefd3381b7666d797
@@@ -85,10 -80,9 +85,10 @@@ static uint16_t inet_checksum(void *dat
  static bool ratelimit(int frequency) {
        static time_t lasttime = 0;
        static int count = 0;
 +      time_t now = time(NULL);
        
        if(lasttime == now) {
-               if(++count > frequency)
+               if(count >= frequency)
                        return true;
        } else {
                lasttime = now;