From nobody Tue Dec 17 10:08:18 2024 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 4YCCDy55gzz5h0x6; Tue, 17 Dec 2024 10:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCCDy2J4fz4C94; Tue, 17 Dec 2024 10:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430098; 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=S4omzMrQL039YXILBIj1/bijvlcJVAVPuR/cKM3z+Qk=; b=ewEWQquI/REHu4I5rOXh6SHYz0CWWg8mbjPi9kQeYE0FGuFURlc7w4jUuXt0LPfMIRtdat i/F0u67GBa//2kLGCHsWSC3XDMnNM4DJXkf+9qsod69PZWkxStAXZrtOcBo2U1ZbV3KuzX WykIcIFJ53Sy7zMuFATq3VVZckI6o4kj0Na/sjJ7FxFw6HL0ww9cBHGySLxNVT6fPM9vjz if6ozohiaC+SHug5QzLZfbc0thHhcTrFXB4u/cEIoX/82qNNdDXo6mN8D7t8IDLxauu9rn TmaVGAlwedJrWBKCQJe0y1F2OmkoYV9l8ZGVAFGlYQmycwBYiv7XjXDhfpUCew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430098; 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=S4omzMrQL039YXILBIj1/bijvlcJVAVPuR/cKM3z+Qk=; b=Q7lKpiK5HScnV2RWvJKAq84N1nFtIc9FyRN8Muw++O15QnvF5Kv2RorxfAbFhsVmXkGhDT gyNaFqh2CVj/Mm4j3gEXujWYUSzjPMhcFHpEPuUPa0vG7FoBKRsdOr4vwsRFTfA6x08ERW xvZ2EV/leXKjiiPTjJW63J/isnekegede8BGO/l/ERoC7rytsXw7tk2fQMnoYNwrKbzY7a KUG3QrpmA2bTOxTPq/FFI1TJLtF4niUKJ04xWcMo3S6q3WZtAxZmlowy0fTB1sciHcjhrk 4YYl6vC9m/yg5ljuFsPWxFFBSOwhnm4d4c923Y9KLdb2SsHgepu7FvUB8rnPOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734430098; a=rsa-sha256; cv=none; b=FTJIYWlLXGfnKyMt5Ey3jGDUEuJMzlBrzPevBcv0vBDKPipWzmhQW4eFKi/MuIF1jnQTrb UTsIwALFFxkDv2g1jJqizXZ+Z5Yms4glDqqMRbc00Jhr4yG51HUOSS6+bk7wfPAHlwx0IS FtAxea4JoRRpBdkFi8MuC7AaeRvN0s2+A5f7TevyVqiEDg2rSNAY3Sz/PXdg/2qpkLvBGN FqYKygZfH6uvcWMyJR+3tA0KuNv897zxT6/JKeFtPLIJZKWOTK1EUi3l9e02BSW7djHVy9 eNRe0ZoGSSRN3K0h3v5ikyjNeQCTmtvIKCsuMGd1ccmVAUrTnC6knfXJHHhjjQ== 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 4YCCDy1LFzzJv3; Tue, 17 Dec 2024 10:08:18 +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 4BHA8IjZ025118; Tue, 17 Dec 2024 10:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHA8IJL025115; Tue, 17 Dec 2024 10:08:18 GMT (envelope-from git) Date: Tue, 17 Dec 2024 10:08:18 GMT Message-Id: <202412171008.4BHA8IJL025115@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: 706b42cc4bd9 - main - pf: give the correct address family to dummynet after nat64 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 706b42cc4bd9a255ed920b1a4095856f8df9e52c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=706b42cc4bd9a255ed920b1a4095856f8df9e52c commit 706b42cc4bd9a255ed920b1a4095856f8df9e52c Author: Kristof Provost AuthorDate: 2024-12-12 12:50:24 +0000 Commit: Kristof Provost CommitDate: 2024-12-17 10:07:18 +0000 pf: give the correct address family to dummynet after nat64 Pass the new address family rather than the incoming one. In most (i.e. all but nat64) that's the same, but for nat64 we want the new address family instead. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d9c0beb0169f..9128562fd71c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9381,7 +9381,7 @@ pf_pdesc_to_dnflow(const struct pf_pdesc *pd, const struct pf_krule *r, dnflow->f_id.proto = pd->proto; dnflow->f_id.extra = dnflow->rule.info; - switch (pd->af) { + switch (pd->naf) { case AF_INET: dnflow->f_id.addr_type = 4; dnflow->f_id.src_ip = ntohl(pd->src->v4.s_addr); @@ -9490,7 +9490,7 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, MPASS(sa != NULL); - switch (pd->af) { + switch (pd->naf) { case AF_INET: memcpy(&pd->pf_mtag->dst, sa, sizeof(struct sockaddr_in));