Skip to content

Commit

Permalink
linux-user: add missing IPv6 get/setsockopt option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
scweng authored and vivier committed Jan 19, 2021
1 parent e6cd10f commit 75b7643
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linux-user/syscall.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2926,6 +2928,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:
#ifdef IPV6_RECVPATHMTU
case IPV6_RECVPATHMTU:
#endif
Expand Down

0 comments on commit 75b7643

Please sign in to comment.