From nobody Fri May 06 15:42:16 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 18DC71AC87BF; Fri, 6 May 2022 15:42:17 +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 4KvvvX6Mm5z3mDn; Fri, 6 May 2022 15:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651851736; 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=zCdqJ+/csGuHMLE1r3fW2QZiFAX6wG0tp7pOjt8Tk7A=; b=LX73ziNoYKxtLZX/ZoeVYmGX27nSrOigWgny8SqbQYnW4BEZ5o/z+91sBuFuZME6q77rjc BYBD7XMj21ItE/ji2Jowb3GcPNLb5lW/CMvyZNtXc0p589IjuwhUqS0OEZS6KvLV73G56q 6gXtfIavuS8ajPTGV0ZttznjgoN54F91e+DNAA6uQGdECtxWNTpRD2jeILYFq5FXJkiWY6 jf/xPWF+wj0/lCUx1Vp/bNvAxK9GtJbadOcsr5ES0zcfHvxONjsAXPj63SPORGIi6H0DH8 SaWLpjC97i2AS3G02VQrB5W+DvJFffJw4RfTSFvyS3JUiE22cBA1vCyEh/2p1w== 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 9D5A51EA1E; Fri, 6 May 2022 15:42:16 +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 246FgGO8050248; Fri, 6 May 2022 15:42:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246FgGXg050247; Fri, 6 May 2022 15:42:16 GMT (envelope-from git) Date: Fri, 6 May 2022 15:42:16 GMT Message-Id: <202205061542.246FgGXg050247@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: 9501fc936f3b - main - pf: dummynet fix 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: 9501fc936f3bc90d6159b4706f2728f6678848cd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651851736; 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=zCdqJ+/csGuHMLE1r3fW2QZiFAX6wG0tp7pOjt8Tk7A=; b=NhTD5MrO7EoHMymYxGykLtcCOEJNT7wrRBUbnINqNIzADwq8ERsxymgGLDsEPW8EksQmgt OQK5GZgcqA1vYlv9+YUBbL9+Xga9sKKTQi4PaZr0RwCR0ST1MshnsaHOwJfGy1FkQPf2tk dvIcUe9hK+f8CGuUrbGfhcha42Ep29WVIpPqjmAAYjzuk8hwBrxtxr2itKoNXVchHst76f HWQoYVpiak90Rf2Gsc0tjJ9+NIBPTq7zj6TUViUKtGFcBJKO+LOSf2bkvzOCkGG5sPHRuh d3jGsujdr8Emy3RSSMRA4jA+ntFxe4TA1HMpgE82iiH9QbNw89tIGSSUoU6biw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651851736; a=rsa-sha256; cv=none; b=dCrnVoAaXAbiaCqh9DFcMdo3jPXBJO5VFmuBHaqgwL0E0PJ5R30AJ6sZMV+phxHSLRNMYT 3RlQJimsghaS8d1KQJPyxwomenl6KS9wZDST7KoveUyYhNExdt07NmndVnHbqo5b0di0Rx oGN5MSVVCydwcLAw60mVUB6f86UZdS52gww8n7Mn09ljhIoe5Zq1ynvTGlTRyck/J5+Zjs jSKG5NaplDT7C43tbpuJQxCm0Kxlo1v85P9oSlpvNvywH1jT6XlvqzEeTkIWlbMj3yFr/i 3FhDiRNWX42b//clGVIhay4pp1c+bFCttg5iBZo8ONdXUc+smFiKMpBpAwTKSA== 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=9501fc936f3bc90d6159b4706f2728f6678848cd commit 9501fc936f3bc90d6159b4706f2728f6678848cd Author: Kristof Provost AuthorDate: 2022-05-06 14:37:47 +0000 Commit: Kristof Provost CommitDate: 2022-05-06 14:37:47 +0000 pf: dummynet fix If we don't have a pipe set we shouldn't feed packets into dummynet. This could occur if we have a 'dnpipe (0, 100)' configuration, for example. We do want to feed the packet to dummynet in the return direction, but not in the forward direction. In that case pf_pdesc_to_dnflow() should return false, rather than pass a pipe number of 0 to dummynet. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 52ee54cd90af..fd4031ac942c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6743,7 +6743,7 @@ pf_pdesc_to_dnflow(int dir, const struct pf_pdesc *pd, if (dir != dndir && pd->act.dnrpipe) { dnflow->rule.info = pd->act.dnrpipe; } - else if (dir == dndir) { + else if (dir == dndir && pd->act.dnpipe) { dnflow->rule.info = pd->act.dnpipe; } else {