git: ada4dc77577f - main - icmp6: clear csum_flags on mbuf reuse

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Thu, 19 Feb 2026 14:21:16 UTC
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=ada4dc77577f7162353e8c2916ba5c258b6210f0

commit ada4dc77577f7162353e8c2916ba5c258b6210f0
Author:     Timo Völker <timo.voelker@fh-muenster.de>
AuthorDate: 2026-02-19 14:15:10 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-02-19 14:21:01 +0000

    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
    MFC after:              3 days
    Differential Revision:  https://reviews.freebsd.org/D55367
---
 sys/netinet6/icmp6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 5b5f7b83623e..7fe18f4a4d2b 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);