From: Eric Dumazet <redacted>
Date: Thu, 27 Sep 2012 16:18:36 +0200
On Thu, 2012-09-27 at 16:11 +0200, Nicolas Dichtel wrote:
quoted
When jiffies wraps around (for example, 5 minutes after the boot, see
INITIAL_JIFFIES) and peer has just been created, now - peer->rate_last can be
< XRLIM_BURST_FACTOR * timeout, so token is not set to the maximum value, thus
some icmp packets can be unexpectedly dropped.
Fix this case by initializing last_rate to 60 seconds in the past.
Signed-off-by: Nicolas Dichtel <redacted>
---
v2: fix initialization of peer instead of adding some tests in
inet_peer_xrlim_allow()
...
Signed-off-by: Eric Dumazet <redacted>
Applied, thanks everyone.