From nobody Tue Feb 25 10:04:53 2025 X-Original-To: pf@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 4Z2Crj4n0pz5pYCl for ; Tue, 25 Feb 2025 10:04:53 +0000 (UTC) (envelope-from bugzilla-noreply@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 4Z2Crj3Pq9z3q9v for ; Tue, 25 Feb 2025 10:04:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740477893; 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: in-reply-to:in-reply-to:references:references; bh=qL9ORARFt6EZtOASVxstEXthiVHojdlYuef0flSPjm8=; b=EOM5GahyBdDtknGHrRNOjEz8Yg+20qL8i+yhWzSUUaDjaE9W9+K5Byv7CF80n59e1sbo2U aksU/UfYafs2NgwixSEWG6qJnOeUsZeEV8k3mQQ+OR11pqelXlWIA733p96ySJOPaEBJtG YnndH0NgEo7cmxVZxPpFFxS/ZSiR2p20r06F/aqn5bA7FzU4fi5xan0f9D3yYCIDGWKH9z jjqbRKLlxFywwqbugyyjiCam2sDSN4YIpNCiRxjnmwihkLP3LFZPklBKVF1u46VkdmuTu5 YEAf6CJzHQ6bKWUVGdQArK3QOz/y22TRVwa28G4FQckJ7QNsrOdEoEaM2rgcNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740477893; a=rsa-sha256; cv=none; b=fy5MJQ7zi09IzBmRj5VAY+uG+FPzticZyITW2CGlXsyZft27BwWjOIx+f+X2Ptd/SeM3hX wxcDrQVuX7pU9bByaLG5wBKJHufiuFv+jFV2RvXeXnq7y+HHGaOQYquu3jADNNhdNsmSSm lNVSUuVQ2b4bDdngOEyvRot5m+25xyV9MuuXmd2QSahhYo1BXjJQKLh944bY534gu0t4Vv TKCGzPfTyoT5ZrQa6ZzASRrMkzOloLvlp0YwEniUuhQCzP3/QXbtEd7LTtJIEyHhqz+5SJ qAc2YTYIUGmjjrzdADoT+xco8anbKjeYxlAkeyvmPmuLJI+w9VclA2i/6SHnmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740477893; 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: in-reply-to:in-reply-to:references:references; bh=qL9ORARFt6EZtOASVxstEXthiVHojdlYuef0flSPjm8=; b=IQHkwsK3bEpFxYwMADXxwtTbf74LGycVvqyTa0OgYIlkmz4ywF419Ja0pZAPYajlIOK17P K4UUsO6irtM58q0p5/9WnObauI60r4Xeusj9+MmaICMP03/uNbfqTWHYudht3qZO3BGMTQ JwyrnhYzmKSHZBjCg1OFrtZpSKJ8GEiYu1tcmh6mcTGQzEJH1OSWLlVljS9i+PVix+xIs1 SfEyKZeYtSTV5NpA4sNfCRmpGTcvRhp6xLx0HAscNKbdJjgnfRvsWwGpxVGnx8anNsjmSX R8IbiBt0DYCmWySmfBNwn5zH9t656m9ax0fS8Z6JEBr2Vl38y1ZPnGU55z83QQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Z2Crj2dFKz6Pn for ; Tue, 25 Feb 2025 10:04:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51PA4rge052236 for ; Tue, 25 Feb 2025 10:04:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51PA4rZ3052235 for pf@FreeBSD.org; Tue, 25 Feb 2025 10:04:53 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 284946] pf: af-to fails when IPv4 nexthop is an IPv6 address Date: Tue, 25 Feb 2025 10:04:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-pf@freebsd.org Sender: owner-freebsd-pf@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284946 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D41265f65a549d919363e322a39cbf3ce0= 34c5de9 commit 41265f65a549d919363e322a39cbf3ce034c5de9 Author: Kristof Provost AuthorDate: 2025-02-21 15:49:45 +0000 Commit: Kristof Provost CommitDate: 2025-02-25 08:32:34 +0000 pf: cope with IPv6 gateways for an IPv4 route in nat64 It's possible for an IPv4 next hop to be specified as an IPv6 address. = This broke pf's route lookup in pf_route(), which is required for nat64. Handle this case just like ip_tryforward(): use the struct sockaddr from the struct nhop_object, and mark a struct route to indicate if_output() has= to use the gateway. Add a test case for this. PR: 284946 Reviewed by: zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D49095 sys/netpfil/pf/pf.c | 40 +++++++++++++++------------- tests/sys/netpfil/pf/nat64.sh | 62 +++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 83 insertions(+), 19 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=