From nobody Fri May 06 18:37:15 2022 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 093331AC33F6; Fri, 6 May 2022 18:37:16 +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 4KvznR6pWjz4pHt; Fri, 6 May 2022 18:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651862236; 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=tqXzgDnmqRbgkM+MlAmEM6Njc9mLAvteWBQXeD4emg8=; b=u16UZTXaptd4dMSOzh53hhv9VHuCKrh5kovKOiRzyfI7xGcSDhp/x0NuWjmY0rBsTujw1s +qOa6Ls91xWuN3SLZhpLcrptoI9UdkChz3xBTmIDFgC8d3cpWfYvxySTPu/YB5adK9lDKe MWf8O6zKCKqczWy/1a0VKxoSNJUgnNPoOul0tVf5IH44c7XHeFo3wTznSDF3j8kEPuQrVf osRXTrSURFg6HyZbBEDV3b+2l0wL0JuIEC+NSZ0T067hy72zJbXXl/R8GqMhHaVi5pelKm uKhGGL3YYtlFdzHVVtAqeXowLJlX9ryyQQTu+vMBjh5clhEADeXrHGlTaLxAwQ== 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 C5190210B1; Fri, 6 May 2022 18:37:15 +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 246IbFPu081540; Fri, 6 May 2022 18:37:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246IbFL8081539; Fri, 6 May 2022 18:37:15 GMT (envelope-from git) Date: Fri, 6 May 2022 18:37:15 GMT Message-Id: <202205061837.246IbFL8081539@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: f8ba180a92c4 - main - net/wireguard-kmod: Fix build on 14-current after udp_tun_func_t() change 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: decke X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8ba180a92c464ae9d4c8621c90149a3bcae25b4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651862236; 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=tqXzgDnmqRbgkM+MlAmEM6Njc9mLAvteWBQXeD4emg8=; b=WasxWvNlwcNPZbCSxEV6fE4HMs8bWDejuaXTohoWWU0+uPSqw7ZJmxwVVcixEf5bWjuJCX 4tyGME+ozrk8PBhCRO6P3OPCh1JLRk3qOm7FBkqcRffqSKsI6VKyxzCfXNjuo+PCLZ+d1J Fun/4TVAfWT165umTaHBEj2I4qtmTdOuC0Kboc7Iq/8SgHsTFhTuzHmLNaQ0pxe0Yaf2oy gtG+BKVCYNh+J8d2Is8DPEgRSwC1Hz9ToYqRnrkZdLpGoeUtVIrcrkHDCQwlyu4kg/5bZr /5UmlCcP5Jggak+BbnyCcV1G6Eswnnda4psQjn4Njr+zw1LoOsZZeS3mie0ncg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651862236; a=rsa-sha256; cv=none; b=E2GtTFhXboKMxRIqiQqk86pgewHFdnIYx3MtAMOoHxqubdz21YJh1D732GuMoX2DHr7LXb MCVQoxK/ZGuBpV/mjD5i5+llOyKcInMFSrcs9zowEjYgFwwRA2NgWTVrOzV0wFnVEqa1nb VSy6Xux1LUNTBCgFyLjwE1s2sbH52+6/cWqgqbqX+op2ISamJf5LyPH83EaOoNtzMxN3bN CLFUNGueHX0/F2L3/vKBmBXhrye/K3dLl103WsEj37rsplYoikeAFtFjD3WOaPA8l9oIY4 +jZT1HPjo5fZ+Aj1G36lp8RU3xVppGDU9Xj99PfYX3ABW60SF6hZ6jWn/nA+Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by decke: URL: https://cgit.FreeBSD.org/ports/commit/?id=f8ba180a92c464ae9d4c8621c90149a3bcae25b4 commit f8ba180a92c464ae9d4c8621c90149a3bcae25b4 Author: Bernhard Froehlich AuthorDate: 2022-05-06 18:36:02 +0000 Commit: Bernhard Froehlich CommitDate: 2022-05-06 18:37:09 +0000 net/wireguard-kmod: Fix build on 14-current after udp_tun_func_t() change PR: 263297 Submitted by: Trond.Endrestol@ximalas.info --- net/wireguard-kmod/Makefile | 1 + net/wireguard-kmod/files/patch-if_wg.c | 84 ++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/net/wireguard-kmod/Makefile b/net/wireguard-kmod/Makefile index ec8eea1632f6..cb3105bb649d 100644 --- a/net/wireguard-kmod/Makefile +++ b/net/wireguard-kmod/Makefile @@ -1,5 +1,6 @@ PORTNAME= wireguard-kmod PORTVERSION= 0.0.20211105 +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..6ba4437fc116 --- /dev/null +++ b/net/wireguard-kmod/files/patch-if_wg.c @@ -0,0 +1,84 @@ +--- if_wg.c.orig 2021-11-05 14:40:17 UTC ++++ if_wg.c +@@ -377,7 +377,11 @@ static struct wg_packet *wg_queue_dequeue_parallel(str + static int wg_queue_both(struct wg_queue *, struct wg_queue *, struct wg_packet *); + static struct wg_packet *wg_queue_dequeue_serial(struct wg_queue *); + static struct wg_packet *wg_queue_dequeue_parallel(struct wg_queue *); ++#if __FreeBSD_version >= 1400057 ++static bool wg_input(struct mbuf *, int, struct inpcb *, const struct sockaddr *, void *); ++#else + static void wg_input(struct mbuf *, int, struct inpcb *, const struct sockaddr *, void *); ++#endif + static void wg_peer_send_staged(struct wg_peer *); + static int wg_clone_create(struct if_clone *, int, caddr_t); + static void wg_qflush(struct ifnet *); +@@ -1946,9 +1950,15 @@ wg_queue_dequeue_parallel(struct wg_queue *parallel) + return (pkt); + } + ++#if __FreeBSD_version >= 1400057 ++static bool ++wg_input(struct mbuf *m, int offset, struct inpcb *inpcb, ++ const struct sockaddr *sa, void *_sc) ++#else + static void + wg_input(struct mbuf *m, int offset, struct inpcb *inpcb, + const struct sockaddr *sa, void *_sc) ++#endif + { + const struct sockaddr_in *sin; + const struct sockaddr_in6 *sin6; +@@ -1965,7 +1975,11 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp + m = m_unshare(m, M_NOWAIT); + if (!m) { + if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); ++#if __FreeBSD_version >= 1400057 ++ return true; ++#else + return; ++#endif + } + + /* Caller provided us with `sa`, no need for this header. */ +@@ -1974,13 +1988,21 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp + /* Pullup enough to read packet type */ + if ((m = m_pullup(m, sizeof(uint32_t))) == NULL) { + if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); ++#if __FreeBSD_version >= 1400057 ++ return true; ++#else + return; ++#endif + } + + if ((pkt = wg_packet_alloc(m)) == NULL) { + if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); + m_freem(m); ++#if __FreeBSD_version >= 1400057 ++ return true; ++#else + return; ++#endif + } + + /* Save send/recv address and port for later. */ +@@ -2027,11 +2049,19 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp + } else { + goto error; + } ++#if __FreeBSD_version >= 1400057 ++ return true; ++#else + return; ++#endif + error: + if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); + wg_packet_free(pkt); ++#if __FreeBSD_version >= 1400057 ++ return true; ++#else + return; ++#endif + } + + static void