mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
tcp: add LINUX_MIB_PAWS_OLD_ACK SNMP counter
Prior patch in the series added TCP_RFC7323_PAWS_ACK drop reason. This patch adds the corresponding SNMP counter, for folks using nstat instead of tracing for TCP diagnostics. nstat -az | grep PAWSOldAck Suggested-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Neal Cardwell <ncardwell@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Tested-by: Neal Cardwell <ncardwell@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20250113135558.3180360-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
124c4c32e9
commit
d16b344790
@@ -5969,12 +5969,13 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb,
|
||||
if (unlikely(th->syn))
|
||||
goto syn_challenge;
|
||||
|
||||
/* Old ACK are common, do not change PAWSESTABREJECTED
|
||||
/* Old ACK are common, increment PAWS_OLD_ACK
|
||||
* and do not send a dupack.
|
||||
*/
|
||||
if (reason == SKB_DROP_REASON_TCP_RFC7323_PAWS_ACK)
|
||||
if (reason == SKB_DROP_REASON_TCP_RFC7323_PAWS_ACK) {
|
||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_PAWS_OLD_ACK);
|
||||
goto discard;
|
||||
|
||||
}
|
||||
NET_INC_STATS(sock_net(sk), LINUX_MIB_PAWSESTABREJECTED);
|
||||
if (!tcp_oow_rate_limited(sock_net(sk), skb,
|
||||
LINUX_MIB_TCPACKSKIPPEDPAWS,
|
||||
|
||||
Reference in New Issue
Block a user