ipv6: use SKB_DROP_REASON_IP_OUTNOROUTES in inet6_csk_xmit()

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-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2026-05-11 07:23:10 +00:00 committed by Jakub Kicinski
parent 254084223f
commit 4a64f97325

View File

@ -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 */