HomeFreeBSD

pf: Fix unaligned checksum updates

Description

pf: Fix unaligned checksum updates

The algorithm we use to update checksums only works correctly if the
updated data is aligned on 16-bit boundaries (relative to the start of
the packet).

Import the OpenBSD fix for this issue.

PR: 240416
Obtained from: OpenBSD
MFC after: 1 week
Reviewed by: tuexen (previous version)
Differential Revision: https://reviews.freebsd.org/D27696

(cherry picked from commit c3f69af03ae7acc167cc1151f0c1ecc5e014ce4e)

Details

Provenance
kpAuthored on Dec 20 2020, 8:06 PM
Reviewer
tuexen
Differential Revision
D27696: pf: Fix unaligned checksum updates
Parents
rG63fb868d2913: Follow r354121 to fix some python3 errors in sys.netpfil.*
Branches
Unknown
Tags
Unknown