]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tcp: use SKB_DROP_REASON_IP_OUTNOROUTES in tcp_v6_send_response()
authorEric Dumazet <edumazet@google.com>
Mon, 11 May 2026 07:23:09 +0000 (07:23 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 May 2026 01:31:11 +0000 (18:31 -0700)
Replace a bare kfree_skb() with a modern sk_skb_reason_drop() call,
and provide IP_OUTNOROUTES drop reason.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260511072310.1094859-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/tcp_ipv6.c

index d13d49bfef19457cc5902cb556605a80f4c0ab2c..0d5e2b0a3f579a240e3457881bfe6c647cb3d2d9 100644 (file)
@@ -982,7 +982,7 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
                return;
        }
 
-       kfree_skb(buff);
+       sk_skb_reason_drop(sk, buff, SKB_DROP_REASON_IP_OUTNOROUTES);
 }
 
 static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb,