- ui/vnc.c: Fixed a deadlock bug. - hw/i386: Fix comment style in topology.h - migration/multifd: Remove unnecessary usage of local Error - linux-user: fix sockaddr_in6 endianness - vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del() - iotests: fix 194: filter out racy postcopy-active event - tests/avocado: fix waiting for vm shutdown in replay_linux - ui/vnc: fix debug output for invalid audio message Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 2b6068aae3fe18cd0c948c22b4531b344c3e2b6c)
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From fd2a1eeeaeaba0ca23efd37fa00631ed39081d08 Mon Sep 17 00:00:00 2001
|
|
From: jipengfei_yewu <jipengfei_yewu@cmss.chinamobile.com>
|
|
Date: Mon, 18 Dec 2023 11:59:32 +0000
|
|
Subject: [PATCH] linux-user: fix sockaddr_in6 endianness
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The sin6_scope_id field uses the host byte order, so there is a
|
|
conversion to be made when host and target endianness differ.
|
|
|
|
cheery-pick from 44cf6731d6b9a48bcd57392e8cd6f0f712aaa677
|
|
|
|
Signed-off-by: jipengfei_yewu <jipengfei_yewu@cmss.chinamobile.com>
|
|
Signed-off-by: Mathis Marion <mathis.marion@silabs.com>
|
|
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
Message-Id: <20230307154256.101528-2-Mathis.Marion@silabs.com>
|
|
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
|
|
---
|
|
linux-user/syscall.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
|
index a544d04524..92df0f9d8c 100644
|
|
--- a/linux-user/syscall.c
|
|
+++ b/linux-user/syscall.c
|
|
@@ -1701,6 +1701,11 @@ static inline abi_long target_to_host_sockaddr(int fd, struct sockaddr *addr,
|
|
lladdr = (struct target_sockaddr_ll *)addr;
|
|
lladdr->sll_ifindex = tswap32(lladdr->sll_ifindex);
|
|
lladdr->sll_hatype = tswap16(lladdr->sll_hatype);
|
|
+ } else if (sa_family == AF_INET6) {
|
|
+ struct sockaddr_in6 *in6addr;
|
|
+
|
|
+ in6addr = (struct sockaddr_in6 *)addr;
|
|
+ in6addr->sin6_scope_id = tswap32(in6addr->sin6_scope_id);
|
|
}
|
|
unlock_user(target_saddr, target_addr, 0);
|
|
|
|
--
|
|
2.27.0
|
|
|