From nobody Fri Dec 22 16:07:40 2023 X-Original-To: dev-commits-ports-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 4SxXJD6wqnz548M3; Fri, 22 Dec 2023 16:07:40 +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 4SxXJD5yYPz3TYJ; Fri, 22 Dec 2023 16:07:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703261260; 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=BZUkRh1SVDQ05yQ6ghQJO/Ow39QMaFiMXrjTXlgWtOI=; b=hQsVRcYubctm54jeHOil3K4eXjKyfBVp7Ir3SsB4/AbtGexRPlSkE7aIX20V2t2eBvXCpN IrsMFFzIjpwl3OQMVgz/HXedCRTcDDFKvJwG2qCeW2aVd458YjyaNaeNx3VIlx6qfpT3G6 tM7SKlG34bgYvV/RP+r1HfY8kcdJW3cSN2tCHVg4G9y1oPKYkOv6ai5IkO/HIftbxM/Xf7 9FEm159jZ/vpSpqLSDAXLfVgiFc8VMS0F0grZIqRpWEKNeIL2J6itHAZLh1DAkTcbfkgpF UBYdtwXE9shiZ2JIZq8OtuYyRqIxlvuZs94q3g6TgsQe/lwV1ywWt6rnEaTZBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703261260; a=rsa-sha256; cv=none; b=qZwx2f/IUfrvlNo/a2wdqph6yeD8NMLtRmaLZ6yjF0mJVJWHqvZlO2ynLtTzGVE2QOS9N+ CzY1Ix8O4O43HwZN0L+DanG0n0E9gkUV1G+zI5Ip56v2D5HNIjz7+I/hpuIDoZ/UkqsPLR /X5XZwxfK1ucB4O7SFYNpkPGnAEz0ln6MZtfcQLceB3UdXig8mQg5UBNaDZnBWY6QT5xjy Av5zZ/RjLy4xTh08D7ANn5ihrnE4f4d9fYLiKDPPdnLzDL4MHfwFlbDptywtGYQUIZJGXX TWRARrz+xRNWqm76S+ovmA4/uII6KVGV7x5NpYhXKzypdba33RShCTp3CkWtsA== 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=1703261260; 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=BZUkRh1SVDQ05yQ6ghQJO/Ow39QMaFiMXrjTXlgWtOI=; b=Xf12pMhyraqEegF4z/8GQa5m03dsgO66u5GRXhmVE9K23y6ajtdPz3kYuffjJP/FTXllQH u3hqxIMSM0lFmkEPK+UzuhOCb9sljMPei1c5AGPyHbAbdLK+018RolDcIVGxzkwCRKwuCM gGjp/xarP+ykqhVDIL3VKp3KaL3BpJdWjM4fjjh8N4+CO8xT+hRFpex8oc23SgPV8CRFzS LLMuIdIcen7nNtOmTRy/xY0ehsQpM493/F8v19G3StzmfeExL6TIZNQFpCJ/w8nilp/uJ7 DQNK1SYKjnBFrHZIYTdFEZJqhq2n2pMYDOIuJ2AbYc9Wmo98KOXtMo8/A0EQGA== 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 4SxXJD51Q1z7Wx; Fri, 22 Dec 2023 16:07:40 +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 3BMG7eFn028284; Fri, 22 Dec 2023 16:07:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BMG7e0D028281; Fri, 22 Dec 2023 16:07:40 GMT (envelope-from git) Date: Fri, 22 Dec 2023 16:07:40 GMT Message-Id: <202312221607.3BMG7e0D028281@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Olivier Cochard Subject: git: 75d90603569e - main - net/ndproxy: fix build on FreeBSD kernel >= 14 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75d90603569e933e8e92d514f361c1f16557941e Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/ports/commit/?id=75d90603569e933e8e92d514f361c1f16557941e commit 75d90603569e933e8e92d514f361c1f16557941e Author: Olivier Cochard AuthorDate: 2023-12-22 16:03:26 +0000 Commit: Olivier Cochard CommitDate: 2023-12-22 16:03:26 +0000 net/ndproxy: fix build on FreeBSD kernel >= 14 Adding support for pfil version 2 interface. Patch already submitted upstream as pull request: https://github.com/AlexandreFenyo/ndproxy/pull/6 PR: 275884 Reported by: Lorenzo Zolfanelli --- net/ndproxy/Makefile | 2 -- net/ndproxy/files/patch-ndproxy.c | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/net/ndproxy/Makefile b/net/ndproxy/Makefile index 589a7a91b415..9f28cd533e49 100644 --- a/net/ndproxy/Makefile +++ b/net/ndproxy/Makefile @@ -10,8 +10,6 @@ WWW= http://www.fenyo.net/newweb/ndproxy.html LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BROKEN_FreeBSD_14= Requires defunct pa_func - USES= compiler kmod SUB_FILES= pkg-message diff --git a/net/ndproxy/files/patch-ndproxy.c b/net/ndproxy/files/patch-ndproxy.c new file mode 100644 index 000000000000..453283283445 --- /dev/null +++ b/net/ndproxy/files/patch-ndproxy.c @@ -0,0 +1,45 @@ +From 9db92ede5e52f50b8a45556c173343f9967c36ad Mon Sep 17 00:00:00 2001 +From: Lorenzo Zolfanelli +Date: Fri, 22 Dec 2023 13:52:19 +0100 +Subject: [PATCH] fix: compatibility with new PFIL version + +Since FreeBSD 14 a new PFIL_VERSION has been introduced with a slight +different data structure definition for `pfil_hook_args`. + +See https://github.com/freebsd/freebsd-src/commit/caf32b260ad46b17a4c1a8ce6383e37ac489f023 +for details of the new PFIL_VERSION implementation. + +With this fix is possible to compile against FreeBSD 14 kernel, and the +pre-processor instruction should assure backwards compatibility. +--- ndproxy.c.orig 2019-02-19 09:43:44 UTC ++++ ndproxy.c +@@ -54,7 +54,7 @@ static pfil_hook_t pfh_hook; + + static pfil_hook_t pfh_hook; + +-static void register_hook() { ++static void register_hook(void) { + struct pfil_hook_args pha; + struct pfil_link_args pla; + +@@ -66,7 +66,11 @@ static void register_hook() { + pha.pa_modname = "ndproxy"; + pha.pa_ruleset = NULL; + pha.pa_rulname = "default-in6"; ++#if PFIL_VERSION > 1 ++ pha.pa_mbuf_chk = packet; ++#else + pha.pa_func = packet; ++#endif + pfh_hook = pfil_add_hook(&pha); + + pla.pa_version = PFIL_VERSION; +@@ -78,7 +82,7 @@ static void register_hook() { + hook_added = true; + } + +-static void unregister_hook() { ++static void unregister_hook(void) { + if (!hook_added) return; + pfil_remove_hook(pfh_hook); + }