From nobody Fri May 6 15:42:17 2022 X-Original-To: dev-commits-src-all@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 EAB231AC8856; Fri, 6 May 2022 15:42:18 +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 4KvvvZ435zz3m1n; Fri, 6 May 2022 15:42:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651851738; 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=i5vCkfcd04/AIrZA3YOR+mfMddGx3+g+Vjfu6zL/mFU=; b=ZGrGogxVnfgs7NaDdwy9w1ADQw5USgNDTLkrY8VsZuFHEQQYHi4XjP7qSm67cTaSpe59CI ziE96k2us8Vrb1Ms+zxMFEjakPHPew700qLnWcQCaNAuoC0pJU04ng0ySJ3ik7QwMEBcL8 rQqATGkmlrUKx+AMuB7te+aKxwIu8/qUPOIpRl6LH4z/SSJWo+IrhfNG0L67jlspcZcvUb CFASqDHLIyIbg20xqkxICy8gyeVa0Ms7LdFWuQbG5HJ5Fjd5MVKFOTulqA2wuZ70/jxzpb +3z0Ee7M9rwk+hnLwNJw+ZhLc71+Z5T0jdLcDSQLLSeJ5bvw0OYVYNhaJ1nizQ== 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 C55BC1E47E; Fri, 6 May 2022 15:42:17 +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 246FgHvc050272; Fri, 6 May 2022 15:42:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246FgHhd050271; Fri, 6 May 2022 15:42:17 GMT (envelope-from git) Date: Fri, 6 May 2022 15:42:17 GMT Message-Id: <202205061542.246FgHhd050271@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: 4d48dd689062 - main - pf: don't reject dummynet-ed packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: 4d48dd68906230f8c41caee6a5c9d7b9f272bdb1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651851738; 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=i5vCkfcd04/AIrZA3YOR+mfMddGx3+g+Vjfu6zL/mFU=; b=gJjr4P6K2mUQJ7cI8CNMUbYKhDFxUQx3wQxLzqHVy4oEbjclYQ1DFqLRx1VLgd4ggBSPsV 5ePdq+xPMBW7weNJZIo8craOLdiINE+SZm04l/ZLeqP2CkBTYMj3H/VG3DgkPEGICb0gtN rWFkjvrlDp332aO2Ty92dqmdRvPLmsBi0/cs8i/M3zXCAgotIyIlEAtQA2h6Hk1KzRz9nY XqlNBtQZUCEN6XeKKTq/NRclwmdzpFdHeBoy1M4R+yNDflOtw1ihLKQ7MDW+Weuj1kxn8j oFSsnBF3CMUFT3QLW6Cbp1L8DndtP8ZH9/ER5050PZeIH2DCU3mRxMs9OO4DCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651851738; a=rsa-sha256; cv=none; b=jwMBuMTV9wP/CMq/qmzXrdKx42pLblrXYOB7OawBbp6m2jVE7d6wjHlZ9chsm57p6MHuIa h7nAiqHj12qycufbSlMCM2D913+u8dUwGY6FGfk1bXn9NK+e0QjgvlM6hhqBcoNEuBm1uz etNDPMopFy6Ai50SPIhDvBdJb9w1DWsQ2iNHQC6N6nbhgC48TnxcULD49HgI78a6LbkZXe fmzlhMfhAtF77h1RX6sa+pDbpqOqGsCGBxIDVJ8OFg+YqLqrVFlRDESfQ4IpeGfcalqhK9 hhpCy0o30N3sppgDmhDXHffVgv2tenKSBXol0PATLPj9d0LHaSyP38FDO28Q2A== 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=4d48dd68906230f8c41caee6a5c9d7b9f272bdb1 commit 4d48dd68906230f8c41caee6a5c9d7b9f272bdb1 Author: Kristof Provost AuthorDate: 2022-05-06 14:41:34 +0000 Commit: Kristof Provost CommitDate: 2022-05-06 14:41:34 +0000 pf: don't reject dummynet-ed packets If we pass a packet to dummynet we should indicate we've passed it (but keep m0 == NULL). Otherwise we'll indicate to the calling layers that the packet has been rejected. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index fd4031ac942c..e9185c4d8587 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7298,9 +7298,7 @@ done: if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { pd.pf_mtag->flags |= PF_TAG_DUMMYNET; ip_dn_io_ptr(m0, &dnflow); - if (*m0 == NULL) - action = PF_DROP; - else + if (*m0 != NULL) pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET; } } @@ -7758,9 +7756,7 @@ done: if (pf_pdesc_to_dnflow(dir, &pd, r, s, &dnflow)) { pd.pf_mtag->flags |= PF_TAG_DUMMYNET; ip_dn_io_ptr(m0, &dnflow); - if (*m0 == NULL) - action = PF_DROP; - else + if (*m0 != NULL) pd.pf_mtag->flags &= ~PF_TAG_DUMMYNET; } }