From nobody Wed Feb 12 19:39:04 2025 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 4YtTCD6Y1bz5nGmf; Wed, 12 Feb 2025 19:39:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YtTCD57Q0z3XmP; Wed, 12 Feb 2025 19:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739389144; 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=NWQFPfhnp76L2fbhI/1cNCJQIsSwaEazsfEFkA6bEJ8=; b=VvlqMw1bEMHOacJgPnnfmbSiRQRoe08KBRhUp3Sm9/NZ/QUBazTqs0p9Ws1tDuTBhCdigJ H7CyofN6WkMFHfY/e2aCOQpCJtPXa7EQ2Mf15PrKf+jxwZCIN/C8jjn+A+Kf/aHE9D6QTf qalXnTSsrCfUBcOi6KEXTHw0LotO/B2O/zhZPW9QdSfBZz2qdqgPeSx396FsuLrELIiCdB 8gjReTRhv/y9qwGgtfsgvfHBQDPAk118EWtohquiuXkW2nmso19auOiBJQdznPzD/Wu3FL Jg8y7HVfopl9JhKbMuBhz48ZBcMVZZmAKbNJvOgHMCGDqttdjn9tFt4BlZAiTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739389144; 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=NWQFPfhnp76L2fbhI/1cNCJQIsSwaEazsfEFkA6bEJ8=; b=dlF+LvoOFKndlfhfLgsHzsgZeao5bTnSabWfI5FC3o9lySNWcgrsSGY0lugdc0YbRbt2YO lR/SyzcHFfJcGeoPJQ+Zs31SWpcDTcpMMQoJleJ3e36VQAAN8qdjr4/abz77zMTRaK0Ld9 r1pqGPrQsQpNAbtJEOu4B9iiUGuEvjMYIicjTAW8WZev8D/SWETSX2FLHmJgVtQ7yy8orj igRxu1uQ6/wc4Quk1KEfu8H4uw+We9LtiYFYPgQ7QqwyMQe9wE27TTHsjpHeNm2otdgyxN Qll2lKDB99x8APOu0MjFHnB+uFRLL/W4eClk80v8lz7b3MCtamwuA5Gs6GxeYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739389144; a=rsa-sha256; cv=none; b=NBTZtjtnSLcHAxGrd6xn2gADmLJZItyqh7RGjjEi6EdyKYE5voEVKeH3/AWUDcFkK7NjcP GOsVTUcFHAP1L4wXXdspcDkPxfJKuFdsO8cTkyYuOy5DGvI61LcBhhWsAvPccHGDpI268E LbT6k6vh/buqi7XnudhazVBZNruJBR+aWRC9hovXmm83NEGnG8dLTZ9omSfVI9OWKZDfws CQTConXd+HS6SbVjKZfxvdLzCozu3vmxnSj02mPTsPc2WxztlmAyRX2f28WZS9a0Wy1XqN amfVq/OIDj5ffCki/5FlVjkiDT56JONV/zo5SLZ0NBRfU1z2GXqHIbVBYpA1Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YtTCD4ZDKz1BRb; Wed, 12 Feb 2025 19:39:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51CJd4NG061574; Wed, 12 Feb 2025 19:39:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51CJd4XS061571; Wed, 12 Feb 2025 19:39:04 GMT (envelope-from git) Date: Wed, 12 Feb 2025 19:39:04 GMT Message-Id: <202502121939.51CJd4XS061571@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: 65832496f4e7 - main - pf: set osport and odport in pf_setup_pdesc() 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 65832496f4e75482cb988e524cbf5ef8e5c12c47 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=65832496f4e75482cb988e524cbf5ef8e5c12c47 commit 65832496f4e75482cb988e524cbf5ef8e5c12c47 Author: Kristof Provost AuthorDate: 2025-02-05 16:36:29 +0000 Commit: Kristof Provost CommitDate: 2025-02-12 19:38:38 +0000 pf: set osport and odport in pf_setup_pdesc() Set up osport and odport (original src/dst port) in pf_setup_pdesc already. Need that for upcoming changes. ok ryan Obtained from: OpenBSD, henning , f82a6f97e0 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 17c23f6d4194..874fd0678f7a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10180,6 +10180,12 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, } #endif } + + if (pd->sport) + pd->osport = pd->nsport = *pd->sport; + if (pd->dport) + pd->odport = pd->ndport = *pd->dport; + return (0); }