[Qemu-devel] [PATCH 2/2] linux-user: update do_setsockopt()

Laurent Vivier posted 2 patches 7 years, 4 months ago
[Qemu-devel] [PATCH 2/2] linux-user: update do_setsockopt()
Posted by Laurent Vivier 7 years, 4 months ago
add IPV6_MULTICAST_HOPS and IPV6_MULTICAST_LOOP that need
32bit value conversion

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 4460f1e39a..50e20fb659 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3019,6 +3019,8 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
         case IPV6_V6ONLY:
         case IPV6_RECVPKTINFO:
         case IPV6_UNICAST_HOPS:
+        case IPV6_MULTICAST_HOPS:
+        case IPV6_MULTICAST_LOOP:
         case IPV6_RECVERR:
         case IPV6_RECVHOPLIMIT:
         case IPV6_2292HOPLIMIT:
-- 
2.14.4


Re: [Qemu-devel] [PATCH 2/2] linux-user: update do_setsockopt()
Posted by Philippe Mathieu-Daudé 7 years, 4 months ago
On 06/27/2018 06:21 PM, Laurent Vivier wrote:
> add IPV6_MULTICAST_HOPS and IPV6_MULTICAST_LOOP that need
> 32bit value conversion
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  linux-user/syscall.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 4460f1e39a..50e20fb659 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -3019,6 +3019,8 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
>          case IPV6_V6ONLY:
>          case IPV6_RECVPKTINFO:
>          case IPV6_UNICAST_HOPS:
> +        case IPV6_MULTICAST_HOPS:
> +        case IPV6_MULTICAST_LOOP:
>          case IPV6_RECVERR:
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>