Date: Wed, 31 Aug 2022 13:42:15 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 976d9d5dd7bf - main - net/tcpmssd: use PF_DIVERT on FreeBSD 14 Message-ID: <202208311342.27VDgFvv051180@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 commit 976d9d5dd7bf15a4f9e1eef1dc1e2e062f4f2f24 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-08-31 13:41:43 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> 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 */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208311342.27VDgFvv051180>