From nobody Wed Aug 31 13:42:15 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 4MHlj35Pr1z4bRY6; Wed, 31 Aug 2022 13:42:15 +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 4MHlj34z47z3lR7; Wed, 31 Aug 2022 13:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661953335; 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=84JJMLghtgVWDOzKUDFIt4YKSLHxtnUHOxIHUIR3+HY=; b=b/E3Kcuc3z8nmULdjt9cgBBFpkvoMQzql8VhcjaJ+F48NwGS2nDxLQwK7nanEtJ1BJZ/pt EYDLddvK6+2Jhu2kvGXxUnTITTYNpVPUfhSAWo8MjrLJNKZfhi4KtK29/EGLXrRGRoE/II 0/x6U+V2ihV0QIrsKNkIXFVV+Jl+0UJxh4ajivWF1xy/25r7zRoAH7QLSyRsQAoeKpsnvS EPmVjzqNerKG90OBzdvdPEmHvcuWrCmenvMfjISWxc98ji44K7cDvJyRbt+cF5vv/bfTud fqH5P7opVMyENJE1DnCPjSIWtVyavEq5HTwxXYNDIN0gdKl0BMpqGCmxvv1+rw== 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 4MHlj341THz18HK; Wed, 31 Aug 2022 13:42: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 27VDgFxL051181; Wed, 31 Aug 2022 13:42:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27VDgFvv051180; Wed, 31 Aug 2022 13:42:15 GMT (envelope-from git) Date: Wed, 31 Aug 2022 13:42:15 GMT Message-Id: <202208311342.27VDgFvv051180@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 976d9d5dd7bf - main - net/tcpmssd: use PF_DIVERT on FreeBSD 14 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: glebius X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661953335; 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=84JJMLghtgVWDOzKUDFIt4YKSLHxtnUHOxIHUIR3+HY=; b=Gm+a4KPt6/mCiuzOqf/7bBlU0xmvFtRv7Z5tsUY3hwPjlK639PyuxNH0GXwCxpI/4wqtDB w46nkgQNf10Ay4LA3hCnNuwfVXcA5TifGSsJCRw8QIg00oly4pH4YFnRO8wZi2CG7OCC3e 7mjpYu0LYbMxHivW7S+x5jEIijt8DujrpJIwjqJiKsI70Iic9637vXFodpknQM6p2mVpQo 8aF5KfsCsJCzh8neqh8FiLllNnLIvWPMeDp+YUtDCSoMcB9EqAbmMqyKjgNImbEIngIp3B e/lCkNmRD4dQhDrgP7jOK//E4R5Yews3dyIaZNQLiDS5NMpIOy9/wxQofWkWXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661953335; a=rsa-sha256; cv=none; b=hESJtWM6ixomu64oZcZ0L5JuSriS0M3UvLy1Lyev5xG/Osai93k3QlIm65Me1I6Z0hw1nh hPhzkCS7uEdIXDq1AINVoWNitwRKw6ew9yMOdGp4H/FIAU4HiA3ZpYLZrjk6CKUL0E+mju F7hEukjSByT1Ivy2Rr0WxyWHEAp38iDlaG0dXrIHmlkefCnefJbA4ynntSOohnkpbC6WfG ktHyqhJbcMsx9/guixQ680wVNhN0iM68Bg4HAEGUjBdL6dy1MgD1ayMYyr2Iq5ldEbfGCT Wr1EpGalu7xOt7h3yzCpnRDL7uDj9XGx86Wpgv6hzlZsYZyvsDc1QdUTf27/LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 commit 976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 Author: Gleb Smirnoff AuthorDate: 2022-08-31 13:41:43 +0000 Commit: Gleb Smirnoff CommitDate: 2022-08-31 13:41:43 +0000 net/tcpmssd: use PF_DIVERT on FreeBSD 14 to avoid runtime warning. Approved by: mikael --- net/tcpmssd/Makefile | 1 + net/tcpmssd/files/tcpmssd.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/net/tcpmssd/Makefile b/net/tcpmssd/Makefile index ea8abadd2d0c..b6427d11760d 100644 --- a/net/tcpmssd/Makefile +++ b/net/tcpmssd/Makefile @@ -1,5 +1,6 @@ PORTNAME= tcpmssd PORTVERSION= 1.1 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= # none DISTFILES= # none diff --git a/net/tcpmssd/files/tcpmssd.c b/net/tcpmssd/files/tcpmssd.c index ea485c154b5c..02a2a7b171ae 100644 --- a/net/tcpmssd/files/tcpmssd.c +++ b/net/tcpmssd/files/tcpmssd.c @@ -123,7 +123,11 @@ main(int argc, char *argv[]) /* NOTREACHED */ } +#ifdef PF_DIVERT + if ((s = socket(PF_DIVERT, SOCK_RAW, 0)) == -1) { +#else if ((s = socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT)) == -1) { +#endif err(1, "can't create divert socket"); /* NOTREACHED */ }