From nobody Sun Oct 17 12:43:36 2021 X-Original-To: dev-commits-src-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 CCB7B180D081; Sun, 17 Oct 2021 12:43:36 +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 4HXKS85BQWz3Lgd; Sun, 17 Oct 2021 12:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 918D55519; Sun, 17 Oct 2021 12:43:36 +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 19HChaUS027671; Sun, 17 Oct 2021 12:43:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19HCha9m027670; Sun, 17 Oct 2021 12:43:36 GMT (envelope-from git) Date: Sun, 17 Oct 2021 12:43:36 GMT Message-Id: <202110171243.19HCha9m027670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 99f563ed76f4 - main - linux: recognize TCP_INFO and ratelimit the warning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99f563ed76f49c541e587a2f81bc43c62c86c0e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=99f563ed76f49c541e587a2f81bc43c62c86c0e5 commit 99f563ed76f49c541e587a2f81bc43c62c86c0e5 Author: Edward Tomasz Napierala AuthorDate: 2021-10-17 12:19:05 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-10-17 12:19:10 +0000 linux: recognize TCP_INFO and ratelimit the warning This ratelimits the "unsupported getsockopt level 6 optname 11" warnings that happen all the time when watching Netflix. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32454 --- sys/compat/linux/linux_socket.c | 4 ++++ sys/compat/linux/linux_socket.h | 1 + 2 files changed, 5 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index e9f95098a407..9ae44b909d80 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -574,6 +574,10 @@ linux_to_bsd_tcp_sockopt(int opt) return (TCP_KEEPINTVL); case LINUX_TCP_KEEPCNT: return (TCP_KEEPCNT); + case LINUX_TCP_INFO: + LINUX_RATELIMIT_MSG_OPT1( + "unsupported TCP socket option TCP_INFO (%d)", opt); + return (-2); case LINUX_TCP_MD5SIG: return (TCP_MD5SIG); } diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 398f184c5e81..9c37d8c97c3d 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -314,6 +314,7 @@ int linux_accept(struct thread *td, struct linux_accept_args *args); #define LINUX_TCP_KEEPIDLE 4 #define LINUX_TCP_KEEPINTVL 5 #define LINUX_TCP_KEEPCNT 6 +#define LINUX_TCP_INFO 11 #define LINUX_TCP_MD5SIG 14 #endif /* _LINUX_SOCKET_H_ */