From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFBw7-0006to-IM for qemu-devel@nongnu.org; Thu, 29 Aug 2013 19:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFBw1-0005R1-Cu for qemu-devel@nongnu.org; Thu, 29 Aug 2013 19:47:35 -0400 Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]:58182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFBw0-0005QD-MD for qemu-devel@nongnu.org; Thu, 29 Aug 2013 19:47:29 -0400 From: Laurent Vivier Date: Fri, 30 Aug 2013 01:46:43 +0200 Message-Id: <1377820005-3835-5-git-send-email-laurent@vivier.eu> In-Reply-To: <1377820005-3835-1-git-send-email-laurent@vivier.eu> References: <1377820005-3835-1-git-send-email-laurent@vivier.eu> Subject: [Qemu-devel] [PATCH 4/6] linux-user: add some IPV6 commands in setsockop() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org, Laurent Vivier Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9acc4f5..b32bff0 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: -- 1.8.1.2