From patchwork Fri Oct 7 16:34:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 9366841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A403660752 for ; Fri, 7 Oct 2016 16:37:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94ABE29777 for ; Fri, 7 Oct 2016 16:37:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8958E2977E; Fri, 7 Oct 2016 16:37:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A180C29777 for ; Fri, 7 Oct 2016 16:37:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsY7H-0000Sc-Oo; Fri, 07 Oct 2016 16:35:23 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bsY7H-0000S4-1w for xen-devel@lists.xenproject.org; Fri, 07 Oct 2016 16:35:23 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id 84/7D-01767-ACEC7F75; Fri, 07 Oct 2016 16:35:22 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRWlGSWpSXmKPExsXitHSDve6pc9/ DDWb0cVl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnN9xtYCpawVfQf28/YwDiFtYuRk0NCwF/i 4+42FhCbTUBXomnLX7YuRg4OEQEVidt7DUDCzALaEnvXzWUGsYUFnCUOLFgAZrMAlTyde4Udx OYV8JSYdeAPE8RIOYnzx3+C1XAKeEn8apsONl4IqObLki/sIOOFBNQk5q6Ph2gVlDg58wkLxC oJiYMvXjCDlEgIcEv87bafwMg3C0nVLCRVCxiZVjFqFKcWlaUW6RoZ6CUVZaZnlOQmZuboGhq Y6eWmFhcnpqfmJCYV6yXn525iBIYTAxDsYPy1LOAQoyQHk5Io78vK7+FCfEn5KZUZicUZ8UWl OanFhxhlODiUJHg9zwLlBItS01Mr0jJzgIENk5bg4FES4U0ASfMWFyTmFmemQ6ROMepyLPhxe y2TEEtefl6qlDivH0iRAEhRRmke3AhYlF1ilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMG8VyB SezLwSuE2vgI5gAjoif+kXkCNKEhFSUg2Mkz18OPi2r5613fQkf66mqk3cp4vPbY1izBcl7tE TsZjJ98FH7zybiptn+R+mYz9mL/P7p8C18db3o+tP8/C+nMLytcN4lXzpsyn50zuqdtRUf+wz CFrIkm+YdXz6/DtZTMrxLCn2pfHNTyPN5i9cvqWMS2P58XeKT2rNogJ2b4nfVFB1quS7EktxR qKhFnNRcSIA0Q06X60CAAA= X-Env-Sender: prvs=081af608b=Ian.Jackson@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1475858120!29041586!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 54275 invoked from network); 7 Oct 2016 16:35:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 7 Oct 2016 16:35:21 -0000 X-IronPort-AV: E=Sophos;i="5.31,456,1473120000"; d="scan'208";a="391320903" From: Ian Jackson To: Date: Fri, 7 Oct 2016 17:34:42 +0100 Message-ID: <1475858096-16123-3-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475858096-16123-1-git-send-email-ian.jackson@eu.citrix.com> References: <1475858096-16123-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH 02/16] rump-test-net: setsockopt V6ONLY off X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP NetBSD (unlike Linux) has the V6ONLY socket option turned on by default. So to work in the rump kernel environment when tested with IPv4 we need to adjust this setting. Signed-off-by: Ian Jackson --- rump-test-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rump-test-net.c b/rump-test-net.c index 96dbb1c..486a261 100644 --- a/rump-test-net.c +++ b/rump-test-net.c @@ -21,6 +21,10 @@ int main(int argc, const char *const *argv) { master = socket(AF_INET6,SOCK_STREAM,0); if (master<0) { perror("socket"); exit(-1); } + int no = 0; + r = setsockopt(master, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&no, sizeof(no)); + if (r<0) { perror("IPV6_V6ONLY"); exit(-1); } + int port = atoi(argv[1]); memset(&sin6,0,sizeof(sin6));