aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-05-18 15:29:35 +0000
committerKristof Provost <kp@FreeBSD.org>2022-05-20 12:49:31 +0000
commitb3fa36efe797445cb0b4fd26d79226836db2a2b3 (patch)
tree19db842bcd5a6adf68c1060424af0be0af6d891e /tests
parentbbec8e698b5bfbd568b840fc411b4fd125684045 (diff)
downloadsrc-b3fa36efe797445cb0b4fd26d79226836db2a2b3.tar.gz
src-b3fa36efe797445cb0b4fd26d79226836db2a2b3.zip
pf tests: extend ethernet dummynet test
Extend the existing ethernet dummynet test to also test dummynet on the outbound direction. This used to be a problem as traffic shaping wasn't done in the ethernet code. It merely tagged the packet and left shaping up to the layer 3 pf code. This works in the inbound direction, but not for outbound traffic where we hit the L3 code first and only then the L2 code. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35258
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/netpfil/pf/ether.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh
index 975438dc3438..7a8b9e0d9b38 100644
--- a/tests/sys/netpfil/pf/ether.sh
+++ b/tests/sys/netpfil/pf/ether.sh
@@ -427,6 +427,13 @@ dummynet_body()
# We should now be hitting the limits and get this packet dropped.
atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2
+
+ # We can now also dummynet outbound traffic!
+ pft_set_rules alcatraz \
+ "ether pass out dnpipe 1"
+
+ # We should still be hitting the limits and get this packet dropped.
+ atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2
}
dummynet_cleanup()