]> Git Repo - qemu.git/commitdiff
linux-user/syscall: Introduce target_sockaddr_nl
authorPhilippe Mathieu-Daudé <[email protected]>
Mon, 21 Oct 2019 11:48:52 +0000 (13:48 +0200)
committerLaurent Vivier <[email protected]>
Mon, 21 Oct 2019 13:25:59 +0000 (15:25 +0200)
Tested-By: Guido Günther <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20191021114857[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
linux-user/syscall.c
linux-user/syscall_defs.h

index e2af3c1494fa24fd35d9d651f29cbee7a616a000..f1ab81b91771ac033e54b57b77e0c468dccedda2 100644 (file)
@@ -1496,8 +1496,10 @@ static inline abi_long host_to_target_sockaddr(abi_ulong target_addr,
         sizeof(target_saddr->sa_family)) {
         target_saddr->sa_family = tswap16(addr->sa_family);
     }
-    if (addr->sa_family == AF_NETLINK && len >= sizeof(struct sockaddr_nl)) {
-        struct sockaddr_nl *target_nl = (struct sockaddr_nl *)target_saddr;
+    if (addr->sa_family == AF_NETLINK &&
+        len >= sizeof(struct target_sockaddr_nl)) {
+        struct target_sockaddr_nl *target_nl =
+               (struct target_sockaddr_nl *)target_saddr;
         target_nl->nl_pid = tswap32(target_nl->nl_pid);
         target_nl->nl_groups = tswap32(target_nl->nl_groups);
     } else if (addr->sa_family == AF_PACKET) {
index fa69c6ab8d013fc16d5c89c1736cf61c3655a6af..7694d72446d1c43c9a44b9e87e0aa72e6b96e3af 100644 (file)
@@ -153,6 +153,13 @@ struct target_sockaddr_un {
     uint8_t sun_path[108];
 };
 
+struct target_sockaddr_nl {
+    abi_ushort nl_family;   /* AF_NETLINK */
+    abi_ushort __pad;
+    abi_uint nl_pid;
+    abi_uint nl_groups;
+};
+
 struct target_in_addr {
     uint32_t s_addr; /* big endian */
 };
This page took 0.042302 seconds and 4 git commands to generate.