aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Völker <timo.voelker@fh-muenster.de>2026-02-19 14:15:10 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2026-02-22 09:47:12 +0000
commitea75f726c432586632818bbcd84397ed126fd0a1 (patch)
treec76c10d0e9dd3a4ae34287c2a7f9004a34bae6f5
parent06aeb11f54cf0d3a6f6b720ce585854eb41c65f1 (diff)
icmp6: clear csum_flags on mbuf reuse
When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6 header. For a locally generated packet with checksum offloading, the mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum has to be computed and inserted. Since this not the case anymore, csum_flags need to be cleared. PR: 293227 Reviewed by: kp, zlei, tuexen Differential Revision: https://reviews.freebsd.org/D55367 (cherry picked from commit ada4dc77577f7162353e8c2916ba5c258b6210f0)
-rw-r--r--sys/netinet6/icmp6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index f98381499b2d..9f2e44f3f6e0 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -2133,6 +2133,7 @@ icmp6_reflect(struct mbuf *m, size_t off)
m->m_flags &= ~(M_BCAST|M_MCAST);
m->m_pkthdr.rcvif = NULL;
+ m->m_pkthdr.csum_flags = 0;
ip6_output(m, NULL, NULL, 0, NULL, &outif, NULL);
if (outif)
icmp6_ifoutstat_inc(outif, type, code);