Re: [PATCH net-next v2] net: dropreason: add SKB_DROP_REASON_IP_TTL_EXCEEDED
From: Junjie Cao
Date: Mon Aug 31 2026 - 22:53:40 EST
On Mon, Aug 31, 2026 at 8:23 PM David Ahern <dsahern@xxxxxxxxxx> wrote:
> what about icmp_unreach, ip_expire, and other sources of
> ICMP_TIME_EXCEEDED? The reason code applies to more than just forwarding
> paths.
ip_expire and ip6frag_expire_frag_queue already report
FRAG_REASM_TIMEOUT. That is the reassembly timer (code FRAGTIME), not a
TTL, so it stays.
icmp_unreach is the receiver of a time-exceeded; no packet expires
there.
That leaves IPVS decrement_ttl(): it sends the ICMP, and the callers
then free the skb at their tx_error labels with plain kfree_skb(). A
reason there has to come out of __ip_vs_get_out_rt(), so that is a
separate patch.
> similarly for IPv6, there are more ICMPV6_TIME_EXCEED cases than just
> the forwarding path.
Same picture: frag expiry has FRAG_REASM_TIMEOUT, IPVS is the gap, and
ip6_err_gen_icmpv6_unreach only translates a received v4 error for sit
and gre.
The kernel-doc says "on a packet being forwarded"; v3 drops the
qualifier.