From patchwork Wed Mar 17 01:19:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 12144407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55741C433E0 for ; Wed, 17 Mar 2021 01:21:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D854364DCE for ; Wed, 17 Mar 2021 01:21:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D854364DCE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMKsX-0006g6-QG for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 21:21:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMKqm-0005uu-Cy for qemu-devel@nongnu.org; Tue, 16 Mar 2021 21:19:52 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:35173) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMKqk-0005UG-Oq for qemu-devel@nongnu.org; Tue, 16 Mar 2021 21:19:52 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B027DFA7; Tue, 16 Mar 2021 21:19:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 16 Mar 2021 21:19:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=49tXHCSg1y2E9z41iCbz08EjLB KFbM6SYF3OQt/Z0Bw=; b=ioIRDsjIm7r+Q2bBok1rNuZflUTDSZaTP+JjUGuF3Y Mroy/Bpy66UxP2YCOzT1NU4ADJbBrJLCUVIocb7pIcujwxVft4TVngJeQjnLHDXS MI9RkWHFvxh3i94UD/M1TKFWMzMIaYgEFER2Z79oK/ptd++eJpUNCodC7ARDN4gy JDTStAXWorjGP+cSJ5t2nlwvld+wNE3FSdjf8ThEa8tSoKvHmXPcPNzKtNngTEN0 ujvWIT5t+FHONC4Ck+SKhjxWVP/teoACEFio2HAeCHNU30biI03X9xwD9RMABrzw DCfbXGpRDRhTXNnrcs2We4rqeqtXj56eNKSwnG0KOodw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=49tXHCSg1y2E9z41i Cbz08EjLBKFbM6SYF3OQt/Z0Bw=; b=Ia7qNSCW6YNfO571AyF52VKSOnBrGhwZs VexGQ4o+V/E2ZF6RLOiFjySy+EylEcPXOyu9aKna61Tbf2NrVAovp2Bj919GGXkg uXR0EVQ3r4gnDwrIW0eQn2ClEbJ0GN2Iss+eUmOM56SMShieHuxOqtOa0ld8RVFl kSC5CB/r0sbIyWj0rBsoUShF4AmGDohT4QkV/xnrZJCXQgWwUD3pqQyzgHIX6HIz YA652QuWyjzz3IpIK2z1iULItTLZnS/x72AlEjb/wxSpLfFrPxOi4ybW0ekm3hY2 JOQtJnh+FbtM6j5E30X235ZPc4Ga64Vn8oPxjSSmZGei/poUvAhXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeffedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihunhcu jggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecuggftrf grthhtvghrnhephfejtdektdeuhedtieefteekveffteejteefgeekveegffetvddugfel iefhtddunecukfhppedukedtrdduiedurdduvdefrddutdelnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhl hihgohgrthdrtghomh X-ME-Proxy: Received: from archlinux.U-LINK.com (unknown [180.161.123.109]) by mail.messagingengine.com (Postfix) with ESMTPA id 64D70108005F; Tue, 16 Mar 2021 21:19:44 -0400 (EDT) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH v3] linux-user: add missing MULTICAST_IF get/setsockopt option Date: Wed, 17 Mar 2021 09:19:36 +0800 Message-Id: <20210317011936.9707-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Received-SPF: pass client-ip=64.147.123.21; envelope-from=jiaxun.yang@flygoat.com; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yunqiang Su , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" {IP,IPV6}_MULTICAST_IF was not supported. Signed-off-by: Jiaxun Yang Reported-by: Yunqiang Su --- v3: Add missing reported-by. --- linux-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 389ec09764..77343130b3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2219,6 +2219,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, #ifdef IP_FREEBIND case IP_FREEBIND: #endif + case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: val = 0; @@ -2265,6 +2266,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, case IPV6_V6ONLY: case IPV6_RECVPKTINFO: case IPV6_UNICAST_HOPS: + case IPV6_MULTICAST_IF: case IPV6_MULTICAST_HOPS: case IPV6_MULTICAST_LOOP: case IPV6_RECVERR: @@ -2891,6 +2893,7 @@ get_timeout: #ifdef IP_FREEBIND case IP_FREEBIND: #endif + case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: if (get_user_u32(len, optlen)) @@ -2926,6 +2929,7 @@ get_timeout: case IPV6_V6ONLY: case IPV6_RECVPKTINFO: case IPV6_UNICAST_HOPS: + case IPV6_MULTICAST_IF: case IPV6_MULTICAST_HOPS: case IPV6_MULTICAST_LOOP: case IPV6_RECVERR: