aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorGravatar Eric Dumazet <edumazet@google.com> 2023-02-01 17:43:45 +0000
committerGravatar Jakub Kicinski <kuba@kernel.org> 2023-02-02 21:14:50 -0800
commit2798e36dc233a409a5d3f26f73029596dc504020 (patch)
tree059e250ccf09225bbeb55b0123071aba7caed1ee /net/ipv4/tcp_ipv4.c
parentnet: fec: do not double-parse 'phy-reset-active-high' property (diff)
downloadlinux-2798e36dc233a409a5d3f26f73029596dc504020.tar.gz
linux-2798e36dc233a409a5d3f26f73029596dc504020.tar.bz2
linux-2798e36dc233a409a5d3f26f73029596dc504020.zip
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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 8320d0ecb13a..ea370afa70ed 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -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;
}
}