diff options
author | Helge Deller <deller@gmx.de> | 2025-01-19 03:20:03 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2025-01-24 13:58:40 +0100 |
commit | 017fc6620f2513c1d0217289c48be4c51e0167a7 (patch) | |
tree | 812c93b92dc627fd34218116105875d6904323a2 | |
parent | b97f8d1fa5f783d1ff436b52b29612ecb8793f93 (diff) | |
download | qemu-017fc6620f2513c1d0217289c48be4c51e0167a7.zip qemu-017fc6620f2513c1d0217289c48be4c51e0167a7.tar.gz qemu-017fc6620f2513c1d0217289c48be4c51e0167a7.tar.bz2 |
linux-user: netlink: Add IP_PKTINFO cmsg parsing
Fixes those warnings:
Unsupported host ancillary data: 0/8
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | linux-user/syscall.c | 10 | ||||
-rw-r--r-- | linux-user/syscall_defs.h | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a157abc..df8609b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1998,6 +1998,16 @@ 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 target_in_pktinfo *target_pi = target_data; + + __put_user(pkti->ipi_ifindex, &target_pi->ipi_ifindex); + target_pi->ipi_spec_dst.s_addr = pkti->ipi_spec_dst.s_addr; + target_pi->ipi_addr.s_addr = pkti->ipi_addr.s_addr; + break; + } default: goto unimplemented; } diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index faad914..86d773a 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -2622,6 +2622,12 @@ struct target_ucred { abi_uint gid; }; +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; #define TARGET_SIGEV_MAX_SIZE 64 |