From nobody Fri May 20 12:51:18 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A9C0E1AE0DA0; Fri, 20 May 2022 12:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L4RRq32MFz4vsx; Fri, 20 May 2022 12:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653051079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knkGtBDl6xH06XxhituwVetzxetT7hDlV8kYpFRctU8=; b=G25coFTPnMnneiZrbE+6EgqZgpMDP9mORiFd/EXF7oL5msYKNLVN7EX+NDk+RI3oncmTH7 R4tt+lyNNhK41Lb0qxzSkmPVJVTjr60PlO7uL54rAxkVKxU06/cOPsNEstvAYIgqbAJrKK dY6VOqIdVrr9D5a5jdfv1PiuxCGPE3/hA0ysXq7Xr6gy32zvUj74MKCVAPWPb9dP+8BPHO 3WMECpRJ8D+8J6Z2ZbLxUdQE101gOxTtC6vMttxspBCsO7ES5kWLR2EkDRsus4sHBEYNu9 mvTO3BbVYKrkRhawcDSp3NhHn6pSTSsRIV3Jn8egOtZ4o5kmHvmh+Jv+GwTnzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1738B12777; Fri, 20 May 2022 12:51:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24KCpIYU087022; Fri, 20 May 2022 12:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24KCpIea087021; Fri, 20 May 2022 12:51:18 GMT (envelope-from git) Date: Fri, 20 May 2022 12:51:18 GMT Message-Id: <202205201251.24KCpIea087021@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b3fa36efe797 - main - pf tests: extend ethernet dummynet test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3fa36efe797445cb0b4fd26d79226836db2a2b3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653051079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=knkGtBDl6xH06XxhituwVetzxetT7hDlV8kYpFRctU8=; b=c92TmA7OYOgI2coVhCYpRTeL9QRgaVIQ3Av4T8U2C4iN1+Tp20nHCH5DKMIdgr2yPnpG84 hbl9lxX+miY96U4aI9gZ5LCm6QXBYTjHi3SecxmFBiJ1AVmAWj3+M/ud4JqKSgiJJZRnEj gSAR/ykl+qSkhtTv1yL3z5KIbEg7NuOhHv571QahtLPJPWrYesdmzgbNHD/6NMD23pSYyg enCISRAiEPd2Ghxogkn+ndQxBS+7HB96GqMUlWAr6s9Wl/caMsL7rCITbhnE03KbMLc/Ok VU2pYgajLqsYHAATCE02nk8Ucq830A+eygFcElrNJOzvUghXTsIEoixUflT/uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653051079; a=rsa-sha256; cv=none; b=DCKnVKxvwfF3wmnJZKnL0oH3SSSc/uN/6BRYr/CqEXnxHXizMuU6XFtEUZqkbw2dwAtr7d fiCQRETyuax2XbFLF16tf1nW8FLDdUF3nrnsKs83fb0AuPCL5w3YnpBRorqBt14WcAt8+L Ok+d1I+X68+R9bOALEQhLeQjoaWOnOKkdSSgWa9b4K0uM9FNNKOB/Erj6EGJafWHc913fk lO/J556iHz5SSvOe3copQnn5kbI3a6ClZviL+rjvVDPQ5NUMZzD4K2s8Cn7rdqg+nByvFj yLV73mqlRIzXcBw7blm1MOX4By11b18wsLoE87FvwHQNseHAL51U8mHqYgB8wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3fa36efe797445cb0b4fd26d79226836db2a2b3 commit b3fa36efe797445cb0b4fd26d79226836db2a2b3 Author: Kristof Provost AuthorDate: 2022-05-18 15:29:35 +0000 Commit: Kristof Provost CommitDate: 2022-05-20 12:49:31 +0000 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 --- tests/sys/netpfil/pf/ether.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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()