From: deller@kernel.org
To: "Laurent Vivier" <laurent@vivier.eu>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel@nongnu.org
Cc: deller@gmx.de
Subject: [PULL v3 1/6] linux-user: netlink: Add missing IFA_PROTO to host_to_target_data_addr_rtattr()
Date: Fri, 24 Jan 2025 14:02:49 +0100 [thread overview]
Message-ID: <20250124130254.3134-2-deller@kernel.org> (raw)
In-Reply-To: <20250124130254.3134-1-deller@kernel.org>
From: Helge Deller <deller@gmx.de>
Fix this warning:
Unknown host IFA type: 11
While adding IFA_PROTO, convert all IFA_XXX values over to QEMU_IFA_XXX values
to avoid a build failure on Ubuntu 22.04 (kernel v5.18 which does not know
IFA_PROTO yet).
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/fd-trans.c | 33 +++++++++++++++++++++++++--------
1 file changed, 25 insertions(+), 8 deletions(-)
diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c
index c04a97c73a..2e714c8e56 100644
--- a/linux-user/fd-trans.c
+++ b/linux-user/fd-trans.c
@@ -31,6 +31,22 @@
#include "fd-trans.h"
#include "signal-common.h"
+enum {
+ QEMU_IFA_UNSPEC,
+ QEMU_IFA_ADDRESS,
+ QEMU_IFA_LOCAL,
+ QEMU_IFA_LABEL,
+ QEMU_IFA_BROADCAST,
+ QEMU_IFA_ANYCAST,
+ QEMU_IFA_CACHEINFO,
+ QEMU_IFA_MULTICAST,
+ QEMU_IFA_FLAGS,
+ QEMU_IFA_RT_PRIORITY,
+ QEMU_IFA_TARGET_NETNSID,
+ QEMU_IFA_PROTO,
+ QEMU__IFA__MAX,
+};
+
enum {
QEMU_IFLA_BR_UNSPEC,
QEMU_IFLA_BR_FORWARD_DELAY,
@@ -1138,20 +1154,21 @@ static abi_long host_to_target_data_addr_rtattr(struct rtattr *rtattr)
switch (rtattr->rta_type) {
/* binary: depends on family type */
- case IFA_ADDRESS:
- case IFA_LOCAL:
+ case QEMU_IFA_ADDRESS:
+ case QEMU_IFA_LOCAL:
+ case QEMU_IFA_PROTO:
break;
/* string */
- case IFA_LABEL:
+ case QEMU_IFA_LABEL:
break;
/* u32 */
- case IFA_FLAGS:
- case IFA_BROADCAST:
+ case QEMU_IFA_FLAGS:
+ case QEMU_IFA_BROADCAST:
u32 = RTA_DATA(rtattr);
*u32 = tswap32(*u32);
break;
/* struct ifa_cacheinfo */
- case IFA_CACHEINFO:
+ case QEMU_IFA_CACHEINFO:
ci = RTA_DATA(rtattr);
ci->ifa_prefered = tswap32(ci->ifa_prefered);
ci->ifa_valid = tswap32(ci->ifa_valid);
@@ -1398,8 +1415,8 @@ static abi_long target_to_host_data_addr_rtattr(struct rtattr *rtattr)
{
switch (rtattr->rta_type) {
/* binary: depends on family type */
- case IFA_LOCAL:
- case IFA_ADDRESS:
+ case QEMU_IFA_LOCAL:
+ case QEMU_IFA_ADDRESS:
break;
default:
qemu_log_mask(LOG_UNIMP, "Unknown target IFA type: %d\n",
--
2.47.0
next prev parent reply other threads:[~2025-01-24 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 13:02 [PULL v3 0/6] Linux user fix gupnp patches deller
2025-01-24 13:02 ` deller [this message]
2025-01-24 13:02 ` [PULL v3 2/6] linux-user: Use unique error messages for cmsg parsing deller
2025-01-24 13:02 ` [PULL v3 3/6] linux-user: netlink: Add IP_PKTINFO " deller
2025-01-24 13:02 ` [PULL v3 4/6] linux-user: netlink: Add emulation of IP_MULTICAST_IF deller
2025-01-24 13:02 ` [PULL v3 5/6] linux-user: netlink: add netlink neighbour emulation deller
2025-01-24 13:02 ` [PULL v3 6/6] linux-user: netlink: Add missing QEMU_IFLA entries deller
2025-01-25 3:28 ` [PULL v3 0/6] Linux user fix gupnp patches 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=20250124130254.3134-2-deller@kernel.org \
--to=deller@kernel.org \
--cc=deller@gmx.de \
--cc=laurent@vivier.eu \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@gmail.com \
/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.