Recalculate checksum of normalised packet
authorbket <bket@openbsd.org>
Mon, 10 Oct 2022 16:43:12 +0000 (16:43 +0000)
committerbket <bket@openbsd.org>
Mon, 10 Oct 2022 16:43:12 +0000 (16:43 +0000)
commit33c43c6d649cb278e929a54ed859d02dd780bf43
treebd01711815c5533ae1276227db433f57ab430fec
parent6e8568b90610b9556935b5a812695e4f664c6722
Recalculate checksum of normalised packet

In 2011, henning@ removed fiddling with the ip checksum of normalised
packets in r1.131 of sys/net/pf_norm.c. Rationale was that the checksum
is always recalculated in all output paths anyway. In 2016, procter@
reintroduced checksum modification to preserve end-to-end checksums in
r1.189 of sys/net/pf_norm.c. Likely soomewhere in that timeslot checksum
recalculation of normalised packets was broken.

With input from bluhm@.

OK sashan@, bluhm@
sys/net/pf.c
sys/net/pf_norm.c
sys/net/pfvar.h