From bbf52550be21a255f9388191b626be714a311a50 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Mon, 6 Jul 2026 22:44:06 +0900 Subject: [PATCH] Clear skb->cb state in etherip6_xmit to prevent IPv6 fragmentation issues --- etherip6.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etherip6.c b/etherip6.c index 58cb0cd..5061a4c 100644 --- a/etherip6.c +++ b/etherip6.c @@ -309,6 +309,15 @@ static netdev_tx_t etherip6_xmit(struct sk_buff *skb, struct net_device *dev) skb->ignore_df = 1; skb_dst_set(skb, dst); + /* + * skb->cb belongs to the protocol currently processing the skb. The + * encapsulated frame may leave bridge, qdisc, or inner IPv6 state in it; + * in particular, stale inet6_skb_parm flags or frag_max_size corrupt the + * outer IPv6 fragmentation path. Native IPv6 tunnels clear this state + * in ip6tunnel_xmit() before calling ip6_local_out(). + */ + memset(skb->cb, 0, sizeof(struct inet6_skb_parm)); + stats = this_cpu_ptr(tun->stats); u64_stats_update_begin(&stats->syncp); u64_stats_inc(&stats->tx_packets);