diff options
author | Eric Dumazet <edumazet@google.com> | 2017-10-27 10:47:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 06:24:39 -0400 |
commit | 4170ba6b589ced82da56c7e4f71cc84b2be036d6 (patch) | |
tree | 3dba2c730def3613ab7b5b9572c8a501ab0410af /net/ipv4/tcp_input.c | |
parent | 790f00e19f65673c3c169dfc137c09a9236847d5 (diff) |
tcp: Namespace-ify sysctl_tcp_invalid_ratelimit
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index da1ef666d1f9..db4d458d0205 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -80,7 +80,6 @@ | |||
80 | #include <linux/static_key.h> | 80 | #include <linux/static_key.h> |
81 | 81 | ||
82 | int sysctl_tcp_max_orphans __read_mostly = NR_FILE; | 82 | int sysctl_tcp_max_orphans __read_mostly = NR_FILE; |
83 | int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2; | ||
84 | 83 | ||
85 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ | 84 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ |
86 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ | 85 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ |
@@ -3403,7 +3402,7 @@ static bool __tcp_oow_rate_limited(struct net *net, int mib_idx, | |||
3403 | if (*last_oow_ack_time) { | 3402 | if (*last_oow_ack_time) { |
3404 | s32 elapsed = (s32)(tcp_jiffies32 - *last_oow_ack_time); | 3403 | s32 elapsed = (s32)(tcp_jiffies32 - *last_oow_ack_time); |
3405 | 3404 | ||
3406 | if (0 <= elapsed && elapsed < sysctl_tcp_invalid_ratelimit) { | 3405 | if (0 <= elapsed && elapsed < net->ipv4.sysctl_tcp_invalid_ratelimit) { |
3407 | NET_INC_STATS(net, mib_idx); | 3406 | NET_INC_STATS(net, mib_idx); |
3408 | return true; /* rate-limited: don't send yet! */ | 3407 | return true; /* rate-limited: don't send yet! */ |
3409 | } | 3408 | } |