From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Neal Cardwell <ncardwell@google.com>
Cc: Simon Horman <horms@kernel.org>, Ido Schimmel <idosch@nvidia.com>,
David Ahern <dsahern@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 3/3] ipv6: use SKB_DROP_REASON_IP_OUTNOROUTES in inet6_csk_xmit()
Date: Thu, 7 May 2026 08:43:05 +0000 [thread overview]
Message-ID: <20260507084305.2506115-4-edumazet@google.com> (raw)
In-Reply-To: <20260507084305.2506115-1-edumazet@google.com>
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>
---
net/ipv6/inet6_connection_sock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 37534e1168992c44e1400dacab87e79d04c64a41..4665d84a7380d90b7d180a429017f577fcb6936a 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -102,7 +102,8 @@ int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused
if (IS_ERR(dst)) {
WRITE_ONCE(sk->sk_err_soft, -PTR_ERR(dst));
sk->sk_route_caps = 0;
- kfree_skb(skb);
+ sk_skb_reason_drop(sk, skb,
+ SKB_DROP_REASON_IP_OUTNOROUTES);
return PTR_ERR(dst);
}
/* Restore final destination back after routing done */
--
2.54.0.563.g4f69b47b94-goog
next prev parent reply other threads:[~2026-05-07 8:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 8:43 [PATCH net-next 0/3] net: use IP_OUTNOROUTES drop reason Eric Dumazet
2026-05-07 8:43 ` [PATCH net-next 1/3] net: constify sk_skb_reason_drop() sock parameter Eric Dumazet
2026-05-07 15:14 ` David Ahern
2026-05-07 22:43 ` Kuniyuki Iwashima
2026-05-08 22:15 ` Jakub Kicinski
2026-05-11 7:16 ` Eric Dumazet
2026-05-07 8:43 ` [PATCH net-next 2/3] tcp: use SKB_DROP_REASON_IP_OUTNOROUTES in tcp_v6_send_response() Eric Dumazet
2026-05-07 15:14 ` David Ahern
2026-05-07 22:56 ` Kuniyuki Iwashima
2026-05-07 8:43 ` Eric Dumazet [this message]
2026-05-07 15:14 ` [PATCH net-next 3/3] ipv6: use SKB_DROP_REASON_IP_OUTNOROUTES in inet6_csk_xmit() David Ahern
2026-05-07 22:56 ` Kuniyuki Iwashima
2026-05-11 7:13 ` [PATCH net-next 0/3] net: use IP_OUTNOROUTES drop reason Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260507084305.2506115-4-edumazet@google.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox