]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pf tests: Verify (tcp) checksum modification on unaligned options
authorKristof Provost <kp@FreeBSD.org>
Sat, 19 Dec 2020 15:06:03 +0000 (16:06 +0100)
committerKristof Provost <kp@FreeBSD.org>
Wed, 23 Dec 2020 11:03:20 +0000 (12:03 +0100)
commit2d3fda5fa1dc99aa8788e5f8d8bb71e682101063
tree643c05976846e8a54d0c3743c2430c8ed75be885
parente1f6571a12ed7acba428357b67f6b34df1971605
pf tests: Verify (tcp) checksum modification on unaligned options

It turns out pf incorrectly updates the TCP checksum if the TCP option
we're modifying is not 2-byte algined with respect to the start of the
packet.

Create a TCP packet with such an option and throw it through a scrub
rule, which will update timestamps and modify the packet.

PR: 240416
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D27688
tests/sys/netpfil/common/pft_ping.py
tests/sys/netpfil/pf/Makefile
tests/sys/netpfil/pf/checksum.sh [new file with mode: 0644]