summaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2013-08-30 01:46:43 +0200
committerRiku Voipio <riku.voipio@linaro.org>2013-09-24 10:47:07 +0300
commit0d78b3b5b1b5c391aa96b481be106de023810b66 (patch)
treef92a7f865479b1147505d5b569c5669a815fb8bf /linux-user/syscall.c
parentbd00c74c7fdd8a34d5e22e27931b3a3a77e3b0dd (diff)
downloadqemu-0d78b3b5b1b5c391aa96b481be106de023810b66.zip
linux-user: add some IPV6 commands in setsockop()
Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 505031b80f..7a093bab04 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1315,6 +1315,26 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
goto unimplemented;
}
break;
+ case SOL_IPV6:
+ switch (optname) {
+ case IPV6_MTU_DISCOVER:
+ case IPV6_MTU:
+ case IPV6_V6ONLY:
+ case IPV6_RECVPKTINFO:
+ val = 0;
+ if (optlen < sizeof(uint32_t)) {
+ return -TARGET_EINVAL;
+ }
+ if (get_user_u32(val, optval_addr)) {
+ return -TARGET_EFAULT;
+ }
+ ret = get_errno(setsockopt(sockfd, level, optname,
+ &val, sizeof(val)));
+ break;
+ default:
+ goto unimplemented;
+ }
+ break;
case SOL_RAW:
switch (optname) {
case ICMP_FILTER: