From: Guus Sliepen Date: Sat, 25 Feb 2012 21:52:57 +0000 (+0100) Subject: Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1 X-Git-Tag: import-tinc-1.1~399 X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=36623e15a1c8685e5d8730345c1a7f9c93710fef Merge branch 'master' of git://tinc-vpn.org/tinc into 1.1 --- 36623e15a1c8685e5d8730345c1a7f9c93710fef diff --cc src/route.c index 32be4dec,666f48f6..c73ac9f2 --- a/src/route.c +++ b/src/route.c @@@ -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;