From nobody Sat Apr 5 15:09:39 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1737723962; cv=none; d=zohomail.com; s=zohoarc; b=jiiKw1pY1W5fxeMR6d7riuy7eG+G+jfxDCiKAkKQz63VMe6X/kFaKLv9opHnORxyCuUARBxNQYx4eJxMI5wZRHqMk4ogS76Tb7obYNmpwXHvrhw0nnkPwBwmwWINkBhoFLGOVQb7M+30rP+uXPoPFE/GfHjoZdBNQiu1ZQz1zO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1737723962; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fWx5CAuIBbJDfLzvJwb7YQTA2cvjlafVdk+7wlslSCs=; b=NeOCodNFo077ST3awk3nGTSXLlOCrxfRVw/FGx05oqPKC55wz7YLAt3q4AfxZRDwusFlCpmcF3EQ72x2B1NS1oY14VnBx+4WCoJEcMrHx7ZRAfrQHUDmnNcj1m38nfIcFsRjLnLJ9UM1lQUh2SX5V7nXgePQrVjAA8G9SX9Jl7k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17377239620074.0377597567469365; Fri, 24 Jan 2025 05:06:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbJLe-0000cs-59; Fri, 24 Jan 2025 08:03:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbJL2-0000Pm-PG for qemu-devel@nongnu.org; Fri, 24 Jan 2025 08:03:12 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbJKz-0007GU-EA for qemu-devel@nongnu.org; Fri, 24 Jan 2025 08:03:06 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 732615C5B9E; Fri, 24 Jan 2025 13:02:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DEE1C4CED2; Fri, 24 Jan 2025 13:03:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737723783; bh=ccz5LM+xc8j0WKFoIHGpIfYu4qedCCNtwYrf+iuAPzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IJ193hcCoVk4LgMPWOxXhAOQV6/KEUyg+llxaRl/79mVwst4Y93tLza9OwcrQM5Ud wrlzGwsAmKsMMis7M67FVwmr3WNg3dy5YCxAxn7TsW166qZVyAAymHrARbXiqwxUGz tI8eTqOa27ulAPn4PnGjJjpHTt8J6f3j0OA8EXmVH2yi7hQqXa8Ao9f8Cm8IFDSf+h o0RpAiqRHmApDG0luumRdXJnsDNgO+oSTRdEmsBbagowzafZpdL/FP8cjbDbD9eMQu mbAMe/QYxtHWuT3tjw9XwivAA1IIn3IxGO7FSc1zhyfMPP+4o1kqSliDu/o9LVF8sk 8hTOFbcx4Z8bQ== From: deller@kernel.org To: Laurent Vivier , Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL v3 3/6] linux-user: netlink: Add IP_PKTINFO cmsg parsing Date: Fri, 24 Jan 2025 14:02:51 +0100 Message-ID: <20250124130254.3134-4-deller@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20250124130254.3134-1-deller@kernel.org> References: <20250124130254.3134-1-deller@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=139.178.84.217; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -100 X-Spam_score: -10.1 X-Spam_bar: ---------- X-Spam_report: (-10.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.996, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1737723963759019000 Content-Type: text/plain; charset="utf-8" From: Helge Deller Fixes those warnings: Unsupported host ancillary data: 0/8 Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 10 ++++++++++ linux-user/syscall_defs.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a157abc40c..df8609b4d8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1998,6 +1998,16 @@ static inline abi_long host_to_target_cmsg(struct ta= rget_msghdr *target_msgh, (void *) &errh->offender, sizeof(errh->offender)); break; } + case IP_PKTINFO: + { + struct in_pktinfo *pkti =3D data; + struct target_in_pktinfo *target_pi =3D target_data; + + __put_user(pkti->ipi_ifindex, &target_pi->ipi_ifindex); + target_pi->ipi_spec_dst.s_addr =3D pkti->ipi_spec_dst.s_ad= dr; + target_pi->ipi_addr.s_addr =3D pkti->ipi_addr.s_addr; + break; + } default: goto unimplemented; } diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index faad9147c9..86d773add7 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2622,6 +2622,12 @@ struct target_ucred { abi_uint gid; }; =20 +struct target_in_pktinfo { + abi_int ipi_ifindex; + struct target_in_addr ipi_spec_dst; + struct target_in_addr ipi_addr; +}; + typedef abi_int target_timer_t; =20 #define TARGET_SIGEV_MAX_SIZE 64 --=20 2.47.0