From owner-freebsd-emulation@freebsd.org Wed Mar 2 23:27:25 2016 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63893AC248D for ; Wed, 2 Mar 2016 23:27:25 +0000 (UTC) (envelope-from joe@getsomewhere.net) Received: from prak.gameowls.com (prak.gameowls.com [IPv6:2001:19f0:5c00:950b:5400:ff:fe14:46b7]) by mx1.freebsd.org (Postfix) with ESMTP id 2114C1BE1 for ; Wed, 2 Mar 2016 23:27:25 +0000 (UTC) (envelope-from joe@getsomewhere.net) Received: from [IPv6:2001:470:c412:beef:135:c8df:2d0e:4ea6] (unknown [IPv6:2001:470:c412:beef:135:c8df:2d0e:4ea6]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by prak.gameowls.com (Postfix) with ESMTPSA id D96D418D18 for ; Wed, 2 Mar 2016 17:27:23 -0600 (CST) From: Joe Love Subject: linux(64)-compat and ipv6 setsockopt Message-Id: <7B0DAB1F-3C71-4E20-BC50-8EF4541B8D91@getsomewhere.net> Date: Wed, 2 Mar 2016 17:27:22 -0600 To: freebsd-emulation@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 23:27:25 -0000 I=E2=80=99ve been using FreeBSD 11 with the linux64 support, and have = been using the not-included centos6.7-64bit ports patch to run some = programs which depend on a more modern linux installation. = Specifically, I=E2=80=99ve been using them for Steamcmd, Ark:Survival = Evolved, and Factorio (headless). The latest of which started this = journey. It seems that a piece of code related to setting a particular socket = option for IPv6 sockets fails under the linux compat layer: int ipv6only =3D 1; setsockopt(this->fd6, IPPROTO_IPV6, IPV6_V6ONLY, &ipv6only, = sizeof(ipv6only)); Both Steamcmd and Factorio would spit out error messages like this (this = one being from Factorio): 1.132 Error MultiplayerManager.cpp:108: MultiplayerManager failed: = "Setsockopt failed: Protocol not available=E2=80=9D One of the devs for Factorio looked through a more complete trace, and = their code, and realized that the above line of code was singled out as = causing the error. In trying to understand the issue, I tried their advice - disable IPv6 = (which involved a buildworld/buildkernel) and tried the process again. = In doing so, their code completely skips trying to setup IPv6 at all, so = the program runs fine. Steamcmd also stopped producing the message, so = I assume its issue is similar, or at least also related to IPv6 = support. I think steamcmd is actually 32bit, so it should be able to = verify that same message on a 10.2 system. Ultimately, I=E2=80=99m wondering if there=E2=80=99s a known issue with = IPv6 support of linux apps running using the linux compat module. Thanks, -Joe