All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Add missing IPV6 sockopts
@ 2019-02-27 19:15 Helge Deller
  2019-03-06 13:05 ` Laurent Vivier
  0 siblings, 1 reply; 5+ messages in thread
From: Helge Deller @ 2019-02-27 19:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

When running ssh over IPv6 with linux-user I faced this warning:
 Unsupported setsockopt level=41 optname=67
 setsockopt IPV6_TCLASS 32: Protocol not available:

This patch adds a few missing IPV6 options, including IPV6_TCLASS.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5bbb72f3d5..08efbf14b6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1871,6 +1874,20 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
         case IPV6_RECVHOPLIMIT:
         case IPV6_2292HOPLIMIT:
         case IPV6_CHECKSUM:
+        case IPV6_ADDRFORM:
+        case IPV6_2292PKTINFO:
+        case IPV6_RECVTCLASS:
+        case IPV6_RECVRTHDR:
+        case IPV6_2292RTHDR:
+        case IPV6_RECVHOPOPTS:
+        case IPV6_2292HOPOPTS:
+        case IPV6_RECVDSTOPTS:
+        case IPV6_2292DSTOPTS:
+        case IPV6_TCLASS:
+        case IPV6_RECVPATHMTU:
+        case IPV6_TRANSPARENT:
+        case IPV6_FREEBIND:
+        case IPV6_RECVORIGDSTADDR:
             val = 0;
             if (optlen < sizeof(uint32_t)) {
                 return -TARGET_EINVAL;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Add missing IPV6 sockopts
  2019-02-27 19:15 [Qemu-devel] [PATCH] linux-user: Add missing IPV6 sockopts Helge Deller
@ 2019-03-06 13:05 ` Laurent Vivier
  2019-03-10 11:12   ` [Qemu-devel] [PATCH v2] " Helge Deller
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Vivier @ 2019-03-06 13:05 UTC (permalink / raw)
  To: Helge Deller, qemu-devel; +Cc: Richard Henderson

On 27/02/2019 20:15, Helge Deller wrote:
> When running ssh over IPv6 with linux-user I faced this warning:
>  Unsupported setsockopt level=41 optname=67
>  setsockopt IPV6_TCLASS 32: Protocol not available:
> 
> This patch adds a few missing IPV6 options, including IPV6_TCLASS.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 5bbb72f3d5..08efbf14b6 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1871,6 +1874,20 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>          case IPV6_CHECKSUM:
> +        case IPV6_ADDRFORM:
> +        case IPV6_2292PKTINFO:
> +        case IPV6_RECVTCLASS:
> +        case IPV6_RECVRTHDR:
> +        case IPV6_2292RTHDR:
> +        case IPV6_RECVHOPOPTS:
> +        case IPV6_2292HOPOPTS:
> +        case IPV6_RECVDSTOPTS:
> +        case IPV6_2292DSTOPTS:
> +        case IPV6_TCLASS:
> +        case IPV6_RECVPATHMTU:
> +        case IPV6_TRANSPARENT:
> +        case IPV6_FREEBIND:
> +        case IPV6_RECVORIGDSTADDR:
>              val = 0;
>              if (optlen < sizeof(uint32_t)) {
>                  return -TARGET_EINVAL;
> 

It looks good. Could you also update do_getsockopt() list?

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH v2] linux-user: Add missing IPV6 sockopts
  2019-03-06 13:05 ` Laurent Vivier
@ 2019-03-10 11:12   ` Helge Deller
  2019-03-10 16:01     ` Laurent Vivier
  2019-03-10 16:22     ` Laurent Vivier
  0 siblings, 2 replies; 5+ messages in thread
From: Helge Deller @ 2019-03-10 11:12 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Helge Deller, qemu-devel, Richard Henderson

When running ssh over IPv6 with linux-user I faced this warning:
 Unsupported setsockopt level=41 optname=67
 setsockopt IPV6_TCLASS 32: Protocol not available:

This patch adds code to the linux-user emulatation for setting and
retrieving of a few missing IPV6 options, including IPV6_TCLASS.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 208fd1813d..0da51b1208 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1871,6 +1874,20 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
         case IPV6_RECVHOPLIMIT:
         case IPV6_2292HOPLIMIT:
         case IPV6_CHECKSUM:
+        case IPV6_ADDRFORM:
+        case IPV6_2292PKTINFO:
+        case IPV6_RECVTCLASS:
+        case IPV6_RECVRTHDR:
+        case IPV6_2292RTHDR:
+        case IPV6_RECVHOPOPTS:
+        case IPV6_2292HOPOPTS:
+        case IPV6_RECVDSTOPTS:
+        case IPV6_2292DSTOPTS:
+        case IPV6_TCLASS:
+        case IPV6_RECVPATHMTU:
+        case IPV6_TRANSPARENT:
+        case IPV6_FREEBIND:
+        case IPV6_RECVORIGDSTADDR:
             val = 0;
             if (optlen < sizeof(uint32_t)) {
                 return -TARGET_EINVAL;
@@ -2365,6 +2382,20 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
         case IPV6_RECVHOPLIMIT:
         case IPV6_2292HOPLIMIT:
         case IPV6_CHECKSUM:
+        case IPV6_ADDRFORM:
+        case IPV6_2292PKTINFO:
+        case IPV6_RECVTCLASS:
+        case IPV6_RECVRTHDR:
+        case IPV6_2292RTHDR:
+        case IPV6_RECVHOPOPTS:
+        case IPV6_2292HOPOPTS:
+        case IPV6_RECVDSTOPTS:
+        case IPV6_2292DSTOPTS:
+        case IPV6_TCLASS:
+        case IPV6_RECVPATHMTU:
+        case IPV6_TRANSPARENT:
+        case IPV6_FREEBIND:
+        case IPV6_RECVORIGDSTADDR:
             if (get_user_u32(len, optlen))
                 return -TARGET_EFAULT;
             if (len < 0)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2] linux-user: Add missing IPV6 sockopts
  2019-03-10 11:12   ` [Qemu-devel] [PATCH v2] " Helge Deller
@ 2019-03-10 16:01     ` Laurent Vivier
  2019-03-10 16:22     ` Laurent Vivier
  1 sibling, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2019-03-10 16:01 UTC (permalink / raw)
  To: Helge Deller; +Cc: qemu-devel, Richard Henderson

On 10/03/2019 12:12, Helge Deller wrote:
> When running ssh over IPv6 with linux-user I faced this warning:
>  Unsupported setsockopt level=41 optname=67
>  setsockopt IPV6_TCLASS 32: Protocol not available:
> 
> This patch adds code to the linux-user emulatation for setting and
> retrieving of a few missing IPV6 options, including IPV6_TCLASS.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 208fd1813d..0da51b1208 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1871,6 +1874,20 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>          case IPV6_CHECKSUM:
> +        case IPV6_ADDRFORM:
> +        case IPV6_2292PKTINFO:
> +        case IPV6_RECVTCLASS:
> +        case IPV6_RECVRTHDR:
> +        case IPV6_2292RTHDR:
> +        case IPV6_RECVHOPOPTS:
> +        case IPV6_2292HOPOPTS:
> +        case IPV6_RECVDSTOPTS:
> +        case IPV6_2292DSTOPTS:
> +        case IPV6_TCLASS:
> +        case IPV6_RECVPATHMTU:
> +        case IPV6_TRANSPARENT:
> +        case IPV6_FREEBIND:
> +        case IPV6_RECVORIGDSTADDR:
>              val = 0;
>              if (optlen < sizeof(uint32_t)) {
>                  return -TARGET_EINVAL;
> @@ -2365,6 +2382,20 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>          case IPV6_CHECKSUM:
> +        case IPV6_ADDRFORM:
> +        case IPV6_2292PKTINFO:
> +        case IPV6_RECVTCLASS:
> +        case IPV6_RECVRTHDR:
> +        case IPV6_2292RTHDR:
> +        case IPV6_RECVHOPOPTS:
> +        case IPV6_2292HOPOPTS:
> +        case IPV6_RECVDSTOPTS:
> +        case IPV6_2292DSTOPTS:
> +        case IPV6_TCLASS:
> +        case IPV6_RECVPATHMTU:
> +        case IPV6_TRANSPARENT:
> +        case IPV6_FREEBIND:
> +        case IPV6_RECVORIGDSTADDR:
>              if (get_user_u32(len, optlen))
>                  return -TARGET_EFAULT;
>              if (len < 0)
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH v2] linux-user: Add missing IPV6 sockopts
  2019-03-10 11:12   ` [Qemu-devel] [PATCH v2] " Helge Deller
  2019-03-10 16:01     ` Laurent Vivier
@ 2019-03-10 16:22     ` Laurent Vivier
  1 sibling, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2019-03-10 16:22 UTC (permalink / raw)
  To: Helge Deller; +Cc: qemu-devel, Richard Henderson

On 10/03/2019 12:12, Helge Deller wrote:
> When running ssh over IPv6 with linux-user I faced this warning:
>  Unsupported setsockopt level=41 optname=67
>  setsockopt IPV6_TCLASS 32: Protocol not available:
> 
> This patch adds code to the linux-user emulatation for setting and
> retrieving of a few missing IPV6 options, including IPV6_TCLASS.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 208fd1813d..0da51b1208 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1871,6 +1874,20 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>          case IPV6_CHECKSUM:
> +        case IPV6_ADDRFORM:
> +        case IPV6_2292PKTINFO:
> +        case IPV6_RECVTCLASS:
> +        case IPV6_RECVRTHDR:
> +        case IPV6_2292RTHDR:
> +        case IPV6_RECVHOPOPTS:
> +        case IPV6_2292HOPOPTS:
> +        case IPV6_RECVDSTOPTS:
> +        case IPV6_2292DSTOPTS:
> +        case IPV6_TCLASS:
> +        case IPV6_RECVPATHMTU:
> +        case IPV6_TRANSPARENT:
> +        case IPV6_FREEBIND:
> +        case IPV6_RECVORIGDSTADDR:
>              val = 0;
>              if (optlen < sizeof(uint32_t)) {
>                  return -TARGET_EINVAL;
> @@ -2365,6 +2382,20 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
>          case IPV6_RECVHOPLIMIT:
>          case IPV6_2292HOPLIMIT:
>          case IPV6_CHECKSUM:
> +        case IPV6_ADDRFORM:
> +        case IPV6_2292PKTINFO:
> +        case IPV6_RECVTCLASS:
> +        case IPV6_RECVRTHDR:
> +        case IPV6_2292RTHDR:
> +        case IPV6_RECVHOPOPTS:
> +        case IPV6_2292HOPOPTS:
> +        case IPV6_RECVDSTOPTS:
> +        case IPV6_2292DSTOPTS:
> +        case IPV6_TCLASS:
> +        case IPV6_RECVPATHMTU:
> +        case IPV6_TRANSPARENT:
> +        case IPV6_FREEBIND:
> +        case IPV6_RECVORIGDSTADDR:
>              if (get_user_u32(len, optlen))
>                  return -TARGET_EFAULT;
>              if (len < 0)
> 

Applied to my linux-user branch.

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-10 16:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 19:15 [Qemu-devel] [PATCH] linux-user: Add missing IPV6 sockopts Helge Deller
2019-03-06 13:05 ` Laurent Vivier
2019-03-10 11:12   ` [Qemu-devel] [PATCH v2] " Helge Deller
2019-03-10 16:01     ` Laurent Vivier
2019-03-10 16:22     ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.