qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Shu-Chun Weng <scw@google.com>
Subject: Re: [PULL 3/5] linux-user: add missing IPv6 get/setsockopt option
Date: Wed, 20 Jan 2021 17:00:41 +0100	[thread overview]
Message-ID: <c2a2537c-b042-9065-dac6-749815f66ba4@vivier.eu> (raw)
In-Reply-To: <58abf222-2bcb-4433-7608-ebcc999a2241@amsat.org>

Le 20/01/2021 à 13:16, Philippe Mathieu-Daudé a écrit :
> On 1/19/21 6:54 PM, Laurent Vivier wrote:
>> From: Shu-Chun Weng <scw@google.com>
>>
>> IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported.
>>
>> Signed-off-by: Shu-Chun Weng <scw@google.com>
>> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
>> Message-Id: <20201218193213.3566856-4-scw@google.com>
>> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
>> ---
>>  linux-user/syscall.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index 969db2008104..70c61d15ebf8 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -51,6 +51,7 @@
>>  #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>
>> @@ -2272,6 +2273,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
>>          case IPV6_RECVDSTOPTS:
>>          case IPV6_2292DSTOPTS:
>>          case IPV6_TCLASS:
>> +        case IPV6_ADDR_PREFERENCES:
>>  #ifdef IPV6_RECVPATHMTU
>>          case IPV6_RECVPATHMTU:
>>  #endif
>> @@ -2926,6 +2928,7 @@ get_timeout:
>>          case IPV6_RECVDSTOPTS:
>>          case IPV6_2292DSTOPTS:
>>          case IPV6_TCLASS:
>> +        case IPV6_ADDR_PREFERENCES:
>>  #ifdef IPV6_RECVPATHMTU
>>          case IPV6_RECVPATHMTU:
>>  #endif
>>
> 
> Building on Centos7:
> 
> ../linux-user/syscall.c: In function 'do_setsockopt':
> ../linux-user/syscall.c:2276:14: error: 'IPV6_ADDR_PREFERENCES'
> undeclared (first use in this function)
>          case IPV6_ADDR_PREFERENCES:
>               ^
> ../linux-user/syscall.c:2276:14: note: each undeclared identifier is
> reported only once for each function it appears in
> ../linux-user/syscall.c: In function 'do_getsockopt':
> ../linux-user/syscall.c:2931:14: error: 'IPV6_ADDR_PREFERENCES'
> undeclared (first use in this function)
>          case IPV6_ADDR_PREFERENCES:
>               ^
> 

Strange... this is defined since kernel v2.6.26 in /usr/include/linux/in6.h

7cbca67c0732 [IPV6]: Support Source Address Selection API (RFC5014).

Could try adding the include?

Thanks,
Laurent


  reply	other threads:[~2021-01-20 16:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19 17:54 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-19 17:54 ` [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls Laurent Vivier
2021-01-19 17:54 ` [PULL 2/5] linux-user: add missing UDP get/setsockopt option Laurent Vivier
2021-01-19 17:54 ` [PULL 3/5] linux-user: add missing IPv6 " Laurent Vivier
2021-01-20 12:16   ` Philippe Mathieu-Daudé
2021-01-20 16:00     ` Laurent Vivier [this message]
2021-01-20 16:12       ` Philippe Mathieu-Daudé
2021-01-20 16:22         ` Laurent Vivier
2021-01-20 16:56           ` Philippe Mathieu-Daudé
2021-01-20 17:15             ` Laurent Vivier
2021-01-19 17:54 ` [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt() Laurent Vivier
2021-01-19 17:54 ` [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Laurent Vivier
2021-01-20 14:23 ` [PULL 0/5] Linux user for 6.0 patches Peter Maydell
2021-01-20 19:53 Laurent Vivier
2021-01-20 19:53 ` [PULL 3/5] linux-user: add missing IPv6 get/setsockopt option Laurent Vivier
2021-01-21 12:38 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-21 12:38 ` [PULL 3/5] linux-user: add missing IPv6 get/setsockopt option Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2a2537c-b042-9065-dac6-749815f66ba4@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=scw@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).