Thread (9 messages) 9 messages, 3 authors, 2012-09-27

Re: [PATCH v2] inetpeer: fix token initialization

flat view

From: David Miller <davem@davemloft.net>
Date: 2012-09-27 23:28:09

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help