aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/ipv6_fragmentation.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-09-09selftests: net: add test for ipv6 fragmentationBrett A C Sheffield1-0/+114
Add selftest for the IPv6 fragmentation regression which affected several stable kernels. Commit a18dfa9925b9 ("ipv6: save dontfrag in cork") was backported to stable without some prerequisite commits. This caused a regression when sending IPv6 UDP packets by preventing fragmentation and instead returning -1 (EMSGSIZE). Add selftest to check for this issue by attempting to send a packet larger than the interface MTU. The packet will be fragmented on a working kernel, with sendmsg(2) correctly returning the expected number of bytes sent. When the regression is present, sendmsg returns -1 and sets errno to EMSGSIZE. Link: https://lore.kernel.org/stable/aElivdUXqd1OqgMY@karahi.gladserv.com Signed-off-by: Brett A C Sheffield <bacs@librecast.net> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250903154925.13481-1-bacs@librecast.net Signed-off-by: Paolo Abeni <pabeni@redhat.com>