From patchwork Fri Sep 27 12:10:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 278573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E43362C00B7 for ; Fri, 27 Sep 2013 22:15:59 +1000 (EST) Received: from localhost ([::1]:35982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPWxh-00065C-Vs for incoming@patchwork.ozlabs.org; Fri, 27 Sep 2013 08:15:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPWsK-0005s5-4x for qemu-devel@nongnu.org; Fri, 27 Sep 2013 08:10:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPWs8-00086x-Ur for qemu-devel@nongnu.org; Fri, 27 Sep 2013 08:10:23 -0400 Received: from afflict.kos.to ([92.243.29.197]:51424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPWs8-00085b-Nq for qemu-devel@nongnu.org; Fri, 27 Sep 2013 08:10:12 -0400 Received: from kos.to (a91-156-63-85.elisa-laajakaista.fi [91.156.63.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 9ABE32655C for ; Fri, 27 Sep 2013 14:10:11 +0200 (CEST) Received: from voipio (uid 1000) (envelope-from voipio@kos.to) id 5e0a70 by kos.to (DragonFly Mail Agent); Fri, 27 Sep 2013 15:10:07 +0300 From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 27 Sep 2013 15:10:01 +0300 Message-Id: <0d78b3b5b1b5c391aa96b481be106de023810b66.1380283598.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: Laurent Vivier Subject: [Qemu-devel] [PATCH 06/11] linux-user: add some IPV6 commands in setsockop() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 505031b..7a093ba 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: