From nobody Wed Apr 26 15:10:04 2023 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 4Q62NY0vfGz46djv; Wed, 26 Apr 2023 15:10:05 +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 4Q62NY03DLz3HQ7; Wed, 26 Apr 2023 15:10:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682521805; 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=zvkzNsezsnMj2QJYBcaAEsOlsBXRTIQ+Wm7LOBA3Ims=; b=eIsnBitwyi7bUYLVM+Dfz0utmrp0cm09nIgBhZq4p5HUii7AYG/ZfUS2cfVeD59ykGZONP /SRyCknlIjATnQ/o1ShkJ8nbiS51CMPViou5nxzhfRP9u1ltMtR6zrYU2ug/hY19o11SLf VH4K5UMnW9s2INe36zAxwaS9BZNmm3Pclrh0w/IXMqW1nAkdq4JK3/vH4yHSq87i6U+XJg srkv+csfNYFhkDbRoAski2GU4cI5+RDiB1xrwJj5oJjen5fN3RmEnQG718kS4UiqvNnmAL AOsIiz1VGh8oXsEhBW8IluLFqZN3gtIn3ZsNvSyLpfr9l4Z6pmilZ+b03vS+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682521805; 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=zvkzNsezsnMj2QJYBcaAEsOlsBXRTIQ+Wm7LOBA3Ims=; b=OvQdm2Psp5qQpM5YaIpVSiJ73pPk8e9CyrlHQvNUs3CzEUgysoTXrtZ5Kobo56ZgpahW1a KXmIwSNEx21odOHXjyoqYfimHcFmfzj5qmQsbebAgITn/5qu8n0TjMoBjQGN0/ZO6hhyEJ PRzYy/AHhOuwHF5K6izI5/Ga8Z8dgCzbxi8/77mq85VEiAHbLnG4ITEIWJZ0smHZEKGujp 18XFNymB+A5d6zEbzz8hDpPh3dT7aIf/bfU2nYAYynacCzD7WTEICg252WrcIvWO5OE6vq BJ5V2ZG6H7LgKY2cb6j+u67hxsw6dKzmfuntxDUYRtkjSPPkGCau3J4blqz63A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682521805; a=rsa-sha256; cv=none; b=spUSXjUwAq4LTO2QFNG/L+w7fMXiNU7+Dry3mAU5fRCHRpfsBBcHAj2KKJdalBTeBjYx7b EFESNsYtRHBsibeupj+YPDRdfFDtI/p8290cbpGvUBkoIQdxJB2cRBIdIuO2dE338arGBO jvNOcUsmgCTYiK4JARxNgF3wFd8NCmMDPtt5lbYLwgta4UDtDpRQL/z40bCl3S9lDcp4dS 1U31LEzSfCQqD3OjAsfaiRjSAizRzoQJioZwtEbo+QNiJiypcsVkArPJaFD5AbrkqlcCkV rm1PIYy6m9PSyeZxW+1QW/OVrHB+P7ZXgnuoN1yG/YxMY39eKtvVTz1GKos5zw== 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 4Q62NX5vhtzfkf; Wed, 26 Apr 2023 15:10:04 +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 33QFA4Hm073545; Wed, 26 Apr 2023 15:10:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33QFA4Y8073542; Wed, 26 Apr 2023 15:10:04 GMT (envelope-from git) Date: Wed, 26 Apr 2023 15:10:04 GMT Message-Id: <202304261510.33QFA4Y8073542@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: a81f5112a002 - main - pf: clear PF_TAG_ROUTE_TO for dummynet fast path 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: a81f5112a002196936eacabfc7ab173ce8a5630a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a81f5112a002196936eacabfc7ab173ce8a5630a commit a81f5112a002196936eacabfc7ab173ce8a5630a Author: Kristof Provost AuthorDate: 2023-04-26 13:12:30 +0000 Commit: Kristof Provost CommitDate: 2023-04-26 15:09:47 +0000 pf: clear PF_TAG_ROUTE_TO for dummynet fast path Similar to the PF_TAG_DUMMYNET we must also clear the route tag if dummynet didn't keep the packet. In that case we'd continue immediately and there'd be no need for the route tag. Keeping it could lead to unexpected routing of traffic. See also: 27407a6adc793bdfaef8a86ece32fb1b461429f0 See also: https://redmine.pfsense.org/issues/14055 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 5eebd44c297d..a8da800dd814 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7076,8 +7076,10 @@ pf_dummynet_route(struct pf_pdesc *pd, int dir, struct pf_kstate *s, 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) + if (*m0 != NULL) { + pd->pf_mtag->flags &= ~PF_TAG_ROUTE_TO; pd->pf_mtag->flags &= ~PF_TAG_DUMMYNET; + } } }