From nobody Mon Nov 27 19:46:58 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 4SfGLp3ysMz52Gv3; Mon, 27 Nov 2023 19:46:58 +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 4SfGLp3XRbz3XWj; Mon, 27 Nov 2023 19:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701114418; 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=eWlHfSwaHTr2MfM7RDIhrmUamWUynA+TApTf7sCnLcs=; b=Kv0m3NxXYC3HbrsNgXDhe1tfw8kA/Gqg5gvSj+sq+vQoRBVRUEjrFN40pG4nFw7/jNK+nx mOFpzydKC54O+pVVjWAxXs9klk+mK/dYRjMPj2H3bnnm9VWASJza+uhj37mZF9XXis0Wxt D9FAuLh9DMGEH9GwQCKDZNm5B1v5LGIQO73Qh6QQ80kaR1wmHi+U3tf4wr41oXIejG1Xu3 LCRiDpCAQWSXD4v7r5xiwVvruKw30LmdLVG2GJ2xe2GmFKYg3oTyCl8cy4K/zXdeI0jQ88 Vtoo8Rwe676+29IBtmxDfPJHUWVjOHSLBp3AoGrZwi/zEP4MEbX/GSyOlM/63w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701114418; 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=eWlHfSwaHTr2MfM7RDIhrmUamWUynA+TApTf7sCnLcs=; b=VhRbteAbght6XH4OI9JOg3cSvaI/0reDKB1vCifogIlaMO30WGVAp2/C7J3/8Ka/SEuntl nR5QwQQo3Y4cNGGNYx4KvtcFMSurmhgwh3THU9BBJ5SovMHZErFyKkiZmHLE3O+lw8BHn5 rK1LQmEsHD7mgIerQ89WrCvef9+4ETyiYXmRL3VEp+G7qrddzZIL2W1ulh1K1SQranj1yj RhiJ5NyGG8ZiFgwo4Y+czDJfxSr9Y4Au9x6ccDStADFyfky02DWJSb+vjtsLcLu4yA/YZP P6w3L/It0N+3pF87WhsA1M1T5l4cc76GtUFMEWVN5e7qitdRnPBbabmmFSlmBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701114418; a=rsa-sha256; cv=none; b=n1gmuoxwOO++GMJHcQ3DFSPWpnj+mnHvxryjUb6fgb29Cb1aaHTQ1Zg1IIboqQgw8ZPkvY 40T8KEee1aeuFGxJInmnaFeLBXIxSMFQ580lOkB411MoWzpXmmQe6dCCDcFiffoVj69ktJ ODgcGSBZ4lhtp+DjAmtrMQfXzCw3NQXceKG41fOMLAKojCaTx+8gckG/rBgvSwkLZwRRH2 72ag2cOd4spVYNeR8K6/7kWnUQixnpuil4RQQaBe1KN3wnwoGX74XrqTlFmSHwMO/+CvJr TPi2zCkYoA9QHCPS5PHobPspzXmWTcXP9hucsR/O4G68LeOJLei5VxLeCqoC4g== 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 4SfGLp2fJ7zryK; Mon, 27 Nov 2023 19:46:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ARJkw2F036661; Mon, 27 Nov 2023 19:46:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARJkwll036658; Mon, 27 Nov 2023 19:46:58 GMT (envelope-from git) Date: Mon, 27 Nov 2023 19:46:58 GMT Message-Id: <202311271946.3ARJkwll036658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: acfc2a0500a3 - stable/14 - pf.conf.5: revise divert-to and divert-reply 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/stable/14 X-Git-Reftype: branch X-Git-Commit: acfc2a0500a30f65d190a3360b805aa3548bb157 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=acfc2a0500a30f65d190a3360b805aa3548bb157 commit acfc2a0500a30f65d190a3360b805aa3548bb157 Author: Igor Ostapenko AuthorDate: 2023-11-17 20:01:17 +0000 Commit: Kristof Provost CommitDate: 2023-11-27 19:45:49 +0000 pf.conf.5: revise divert-to and divert-reply (cherry picked from commit 7e1affa242ca83710eb64e2c6184263fbea3deb7) --- share/man/man5/pf.conf.5 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index ce64df78ad62..8255a89587be 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 27, 2023 +.Dd November 17, 2023 .Dt PF.CONF 5 .Os .Sh NAME @@ -2102,19 +2102,22 @@ Only effective before the route lookup happened, i.e. when filtering inbound. .It Xo Ar divert-to Aq Ar host .Ar port Aq Ar port .Xc -Used to redirect packets to a local socket bound to -.Ar host -and +Used to +.Xr divert 4 +packets to the given divert .Ar port . -The packets will not be modified, so -.Xr getsockname 2 -on the socket will return the original destination address of the packet. +Historically +.Ox pf has another meaning for this, and +.Fx pf uses +this syntax to support +.Xr divert 4 instead. Hence, +.Ar host +has no meaning and can be set to anything like 127.0.0.1. +If a packet is re-injected and does not change direction then it will not be +re-diverted. .It Ar divert-reply -Used to receive replies for sockets that are bound to addresses -which are not local to the machine. -See -.Xr setsockopt 2 -for information on how to bind these sockets. +It has no meaning in +.Fx pf . .It Ar probability Aq Ar number A probability attribute can be attached to a rule, with a value set between 0 and 1, bounds not included.