Skip to content

Commit 1735d66

Browse files
committed
pf tests: verify checksum offload handling
Disable epair's checksum offload on one interface in a nat test, to ensure that pf does the right thing in scenarios where one interface offloads checksum handling and one does not. We trust the TCP (or ICMP) checksum verification code to drop the packet if pf does it wrong, which will cause the test case to fail. Suggested by: tuexen Sponsored by: Rubicon Communications, LLC ("Netgate")
1 parent 8a6bfa0 commit 1735d66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/sys/netpfil/pf/nat.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ exhaust_body()
5555
jexec echo ifconfig ${epair_echo}b 198.51.100.2/24 up
5656
jexec echo /usr/sbin/inetd -p ${PWD}/inetd-echo.pid $(atf_get_srcdir)/echo_inetd.conf
5757

58+
# Disable checksum offload on one of the interfaces to ensure pf handles that
59+
jexec nat ifconfig ${epair_nat}a -txcsum
60+
5861
# Enable pf!
5962
jexec nat pfctl -e
6063
pft_set_rules nat \

0 commit comments

Comments
 (0)