mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
tcp: add TCP_MINTTL drop reason
In the unlikely case incoming packets are dropped because of IP_MINTTL / IPV6_MINHOPCOUNT constraints... Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://lore.kernel.org/r/20230201174345.2708943-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
0719bc3a5c
commit
2798e36dc2
@@ -2102,6 +2102,7 @@ process:
|
||||
/* min_ttl can be changed concurrently from do_ip_setsockopt() */
|
||||
if (unlikely(iph->ttl < READ_ONCE(inet_sk(sk)->min_ttl))) {
|
||||
__NET_INC_STATS(net, LINUX_MIB_TCPMINTTLDROP);
|
||||
drop_reason = SKB_DROP_REASON_TCP_MINTTL;
|
||||
goto discard_and_relse;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user