HomeFreeBSD

netinet6: Implement in6_cksum_partial() using m_apply()

Description

netinet6: Implement in6_cksum_partial() using m_apply()

This ensures that in6_cksum_partial() can be applied to unmapped mbufs,
which can happen at least when icmp6_reflect() quotes a packet.

The basic idea is to restructure in6_cksum_partial() to operate on one
mbuf at a time. If the buffer length is odd or unaligned, an extra
residual byte may be returned, to be incorporated into the checksum when
processing the next buffer.

PR: 268400
Reviewed by: cy
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40598

Details

Provenance
markjAuthored on Jun 23 2023, 1:55 PM
Reviewer
cy
Differential Revision
D40598: netinet6: Implement in6_cksum_partial() using m_apply()
Parents
rGfc915f1be145: pseudofs: Fix a potential out-of-bounds access in pfs_lookup()
Branches
Unknown
Tags
Unknown