From nobody Wed Dec 21 14:01:25 2022 X-Original-To: dev-commits-ports-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 4NcZqT3gJsz1H0N8; Wed, 21 Dec 2022 14:01:25 +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 4NcZqT2lH5z4FsT; Wed, 21 Dec 2022 14:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671631285; 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=MZmPFy1QdbHB6JivS6TH7KJafyOkRr7nCMXICqSSDDM=; b=EKOAytGgTq1xEP7IAq9RwUdp64QstvtEI9cyBHdOhk18FlQqwvK2wNYAuhJXEDSuSufc1P wI59vcxQtFeF2fbywZ3uLm/+E4VVNJDFXIhgl8CtW/wXxEB1IIFRSqDwVoeI/ii/eARwcD WtpHQAR9hB2QkNSNrh7ygWS+isdKMqsJ884kgBlF9VvRI/ho3Fwl7yd5QgincTEVs21JUL Q6Fi1JTw2PiZ9d5pJgLtRr6YNCuu+Gu621QExdB3OwyMF64C3lk4j/55LasuV7E4QMUS3V ryFGA2TPg3GPszW7QgYunEE+OKgAbZxKS1NnD3xqv7IcwuP/1bZzejMrDEJckA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671631285; 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=MZmPFy1QdbHB6JivS6TH7KJafyOkRr7nCMXICqSSDDM=; b=twk6/ka2FC+7989dI3rgPI9d4L5vmollC6Fd3vmsZpH1X3RtO640A45Obi2tU3xMnQJcod inejpFunk5EVlMiYKWEvRwSGgHFhCMNCAfjFWwAfAnce87bQzQHUl3bs31Ubhe4lphLrr/ DUFOs+7UWX+H8EMgvHW9XynVGTzY4/IovQ+LfvGb2jd5nqMCFNZwoWpDJrpWsgooXU6FNb yIChE1oAGCRr6Y4rLrV9zQZmZWEziU3k0ufmeiJAO8r4TDuIgED0VQTknry+qacvJ64yWJ xStOhI2WhOew9aMW0sQMfjgdn8n2eB9BG/PIXn/4bi2ewq1EEx6CWmBjS+WNzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671631285; a=rsa-sha256; cv=none; b=V/ZUpreKG8POohINxjvuhgwHxLmcIk8ZMmMdtyBQOLbyeOaEtUd9vhh8rQLVDaQhl9gWPk xXr0nhYPAYjrLHSNKxpFmjfCXVzMtCHoIxokaXBVsn78KVwpvDmMo7CmEmPbZteQfaH3zE 7cDPP4D4OUSNxos4vcPwXyAcgagwJ4t4oLhPkcwQChOD6fYBfCXa1yTLUithwzarBmjiLu fr4AvJiTeHC9Hqj69X2FQVQFpl2w4TSlE9w4vknwui7/82Ok++5J+rAIfwJY0/BfWxQuxG BRWry+gW6ktej8yS1K7pFle+da9Jo1P4alZfsgQwBurzFoKxiqaGyeoZcBHgLg== 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 4NcZqT1qJqzHdq; Wed, 21 Dec 2022 14:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BLE1POa081769; Wed, 21 Dec 2022 14:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BLE1P6T081768; Wed, 21 Dec 2022 14:01:25 GMT (envelope-from git) Date: Wed, 21 Dec 2022 14:01:25 GMT Message-Id: <202212211401.2BLE1P6T081768@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Bernhard Froehlich Subject: git: 17a45735bde9 - main - net/wireguard-kmod: Chase udp_tun_func_t typedef change in FreeBSD 14-current (bb77f0) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: decke X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17a45735bde9d35b8bbdf2c72145573d8b8abf09 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by decke: URL: https://cgit.FreeBSD.org/ports/commit/?id=17a45735bde9d35b8bbdf2c72145573d8b8abf09 commit 17a45735bde9d35b8bbdf2c72145573d8b8abf09 Author: Bernhard Froehlich AuthorDate: 2022-12-21 14:00:26 +0000 Commit: Bernhard Froehlich CommitDate: 2022-12-21 14:00:26 +0000 net/wireguard-kmod: Chase udp_tun_func_t typedef change in FreeBSD 14-current (bb77f0) PR: 266914 Submitted by: Stefan Haller , Guido Falsi --- net/wireguard-kmod/Makefile | 1 + net/wireguard-kmod/files/patch-if__wg.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/net/wireguard-kmod/Makefile b/net/wireguard-kmod/Makefile index 86f803881f82..178ef6bc3e10 100644 --- a/net/wireguard-kmod/Makefile +++ b/net/wireguard-kmod/Makefile @@ -1,5 +1,6 @@ PORTNAME= wireguard-kmod PORTVERSION= 0.0.20220615 +PORTREVISION= 1 CATEGORIES= net net-vpn MASTER_SITES= https://git.zx2c4.com/wireguard-freebsd/snapshot/ DISTNAME= wireguard-freebsd-${PORTVERSION} diff --git a/net/wireguard-kmod/files/patch-if__wg.c b/net/wireguard-kmod/files/patch-if__wg.c new file mode 100644 index 000000000000..283bbfc7615b --- /dev/null +++ b/net/wireguard-kmod/files/patch-if__wg.c @@ -0,0 +1,32 @@ +Chase udp_tun_func_t typedef change in FreeBSD 14-current (bb77f0) + +Submitted by: Stefan Haller , + Guido Falsi +Obtained from: https://bugs.freebsd.org/266914 +Link: https://freshbsd.org/freebsd/src/commit/bb77f0c2049311f0661c2493838d81a5a66c449c +--- if_wg.c.orig 2022-06-15 14:11:06 UTC ++++ if_wg.c +@@ -693,7 +693,11 @@ wg_socket_init(struct wg_softc *sc, in_port_t port) + if (rc) + goto out; + ++#if __FreeBSD_version >= 1400067 ++ rc = udp_set_kernel_tunneling(so4, wg_input, NULL, sc); ++#else + rc = udp_set_kernel_tunneling(so4, (udp_tun_func_t)wg_input, NULL, sc); ++#endif + /* + * udp_set_kernel_tunneling can only fail if there is already a tunneling function set. + * This should never happen with a new socket. +@@ -704,7 +708,11 @@ wg_socket_init(struct wg_softc *sc, in_port_t port) + rc = socreate(AF_INET6, &so6, SOCK_DGRAM, IPPROTO_UDP, cred, td); + if (rc) + goto out; ++#if __FreeBSD_version >= 1400067 ++ rc = udp_set_kernel_tunneling(so6, wg_input, NULL, sc); ++#else + rc = udp_set_kernel_tunneling(so6, (udp_tun_func_t)wg_input, NULL, sc); ++#endif + MPASS(rc == 0); + #endif +