Netdev List
 help / color / mirror / Atom feed
* [PATCH 1/1] [PATCH] l2tp: fix IPv6 xmit frag failure for oversized non-GSO packets
@ 2026-06-10 22:35 Angela Yu
  2026-06-12 16:42 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Angela Yu @ 2026-06-10 22:35 UTC (permalink / raw)
  To: dsahern
  Cc: blair.steven, carl.smith, linux-kernel, Angela Yu,
	David S. Miller, David Ahern, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, netdev

L2TPv3 over IPv6 can generate oversized outer packets when additional
encapsulation overhead is present, such as Dot1q tagging. In this case,
transmission fails instead of fragmenting the packet locally.

The failure occurs because IPv6 transmit path in ip6_xmit() only accepts
packets when one of the following conditions is true: the packet length
does not excent the MTU, skb->ignore_df is set, or the packet is GSO.
For oversized non-GSO packets skb->ignore_df is not set, causing the
packet to fail the transmit checks and hit the
EMSGSIZE/IPSTATS_MIB_FRAGFAILS path instead of being fragments.

This patch contains the line to set skb->ignore_df using
ip6_sk_ignore_df before the transmit conditions. This allows oversized
non-GSO packets to be fragmented and transmited as intended.

This fixes ping failures with oversized packets over L2TPv3/Ipv6 tunnels
where fragmentation is included.
---
 net/ipv6/ip6_output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7e92909ab5be..b28aa214acae 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -359,6 +359,7 @@ int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
 	skb->protocol = htons(ETH_P_IPV6);
 	skb->priority = priority;
 	skb->mark = mark;
+	skb->ignore_df = ip6_sk_ignore_df(sk);
 
 	mtu = dst6_mtu(dst);
 	if (likely((skb->len <= mtu) || skb->ignore_df || skb_is_gso(skb))) {
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-12 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 22:35 [PATCH 1/1] [PATCH] l2tp: fix IPv6 xmit frag failure for oversized non-GSO packets Angela Yu
2026-06-12 16:42 ` Simon Horman
2026-06-12 16:50   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox