From: deller@kernel.org
To: Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
Peter Maydell <peter.maydell@linaro.org>
Cc: deller@gmx.de
Subject: [PULL 3/6] linux-user: netlink: Add IP_PKTINFO cmsg parsing
Date: Wed, 18 Dec 2024 20:52:44 +0100 [thread overview]
Message-ID: <20241218195247.5459-4-deller@kernel.org> (raw)
In-Reply-To: <20241218195247.5459-1-deller@kernel.org>
From: Helge Deller <deller@gmx.de>
Fixes those warnings:
Unsupported host ancillary data: 0/8
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/syscall.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 494323efba..bbe2560927 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1996,6 +1996,18 @@ static inline abi_long host_to_target_cmsg(struct target_msghdr *target_msgh,
(void *) &errh->offender, sizeof(errh->offender));
break;
}
+ case IP_PKTINFO:
+ {
+ struct in_pktinfo *pkti = data;
+ struct in_pktinfo *target_pkti = target_data;
+
+ __put_user(pkti->ipi_ifindex, &target_pkti->ipi_ifindex);
+ host_to_target_sockaddr((unsigned long) &target_pkti->ipi_spec_dst,
+ (void *) &pkti->ipi_spec_dst, sizeof(pkti->ipi_spec_dst));
+ host_to_target_sockaddr((unsigned long) &target_pkti->ipi_addr,
+ (void *) &pkti->ipi_addr, sizeof(pkti->ipi_addr));
+ break;
+ }
default:
goto unimplemented;
}
--
2.47.0
next prev parent reply other threads:[~2024-12-18 19:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 19:52 [PULL 0/6] Linux user fix gupnp patches deller
2024-12-18 19:52 ` [PULL 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr() deller
2024-12-24 11:57 ` Laurent Vivier
2024-12-18 19:52 ` [PULL 2/6] linux-user: Use unique error messages for cmsg parsing deller
2024-12-19 9:57 ` Philippe Mathieu-Daudé
2024-12-24 11:58 ` Laurent Vivier
2024-12-18 19:52 ` deller [this message]
2024-12-18 19:52 ` [PULL 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF deller
2024-12-18 19:52 ` [PULL 5/6] linux-user: netlink: add netlink neighbour emulation deller
2024-12-18 19:52 ` [PULL 6/6] linux-user: netlink: Add missing QEMU_IFLA entries deller
2024-12-19 20:01 ` [PULL 0/6] Linux user fix gupnp patches Stefan Hajnoczi
2024-12-19 21:47 ` Helge Deller
2024-12-31 12:39 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241218195247.5459-4-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.