[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] linux-user: add missing UDP and IPv6 setsoc
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] linux-user: add missing UDP and IPv6 setsockopt options |
Date: |
Sat, 7 Sep 2019 16:10:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Le 23/08/2019 à 01:14, Shu-Chun Weng via Qemu-devel a écrit :
> UDP: SOL_UDP manipulate options at UDP level. All six options currently
> defined in linux source include/uapi/linux/udp.h take integer values.
>
> IPv6: IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not
> supported.
>
> Signed-off-by: Shu-Chun Weng <address@hidden>
> ---
> linux-user/syscall.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 8367cb138d..8dc4255f12 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -49,8 +49,10 @@
> #include <sys/sysinfo.h>
> #include <sys/signalfd.h>
> //#include <sys/user.h>
> +#include <netinet/in.h>
> #include <netinet/ip.h>
> #include <netinet/tcp.h>
> +#include <netinet/udp.h>
> #include <linux/wireless.h>
> #include <linux/icmp.h>
> #include <linux/icmpv6.h>
> @@ -1837,7 +1839,8 @@ static abi_long do_setsockopt(int sockfd, int level,
> int optname,
>
> switch(level) {
> case SOL_TCP:
> - /* TCP options all take an 'int' value. */
> + case SOL_UDP:
> + /* TCP and UDP options all take an 'int' value. */
Could you also do_getsockopt()?
> if (optlen < sizeof(uint32_t))
> return -TARGET_EINVAL;
>
> @@ -2488,6 +2491,7 @@ static abi_long do_getsockopt(int sockfd, int level,
> int optname,
> case IPV6_RECVDSTOPTS:
> case IPV6_2292DSTOPTS:
> case IPV6_TCLASS:
> + case IPV6_ADDR_PREFERENCES:
Could update do_setsockopt() too?
> #ifdef IPV6_RECVPATHMTU
> case IPV6_RECVPATHMTU:
> #endif
>
Thanks,
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 1/2] linux-user: add missing UDP and IPv6 setsockopt options,
Laurent Vivier <=