From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: (web server) serving on both ipv6 and ipv4? Date: Thu, 20 Jan 2022 08:38:42 -0500 Message-ID: References: <87k0ewi0w2.fsf@web.de> <3bbd5a2c267f9e58657b0087e26c92ed36d1b81b.camel@telenet.be> <877dauj23t.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4118"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) Cc: Maxime Devos , guile-devel@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Jan 20 21:22:33 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAdx2-0000te-Sa for guile-devel@m.gmane-mx.org; Thu, 20 Jan 2022 21:22:33 +0100 Original-Received: from localhost ([::1]:43482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAdx1-0007Aj-TQ for guile-devel@m.gmane-mx.org; Thu, 20 Jan 2022 15:22:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAXeJ-0002Ay-JY for guile-devel@gnu.org; Thu, 20 Jan 2022 08:38:48 -0500 Original-Received: from s1.lexort.com ([71.19.148.97]:52090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAXeG-00073f-NG for guile-devel@gnu.org; Thu, 20 Jan 2022 08:38:46 -0500 Original-Received: by s1.lexort.com (Postfix, from userid 10853) id 5C4FE410758; Thu, 20 Jan 2022 08:38:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lexort.com; s=mail; t=1642685922; bh=rxGN+S1uJZS6TnCCp0419kdpGeLnpLBtnoKqZjSEz6o=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=WLCPpm/kjuHu3jEQcl4pvVjJR6noKskYmvqgdSmc5pB5vUkC72Llc6VjgngQTrqwD INkqriRVMBZJ1QJtLK/fsu7RB7WAmD6Xruc/zrMEjSUr9VK4pudZIC4ObC5VLspZax nceAtMSKhSU/0c2bpVVr+7jUanW7+6xMmw+r7uU0= OpenPGP: id=098ED60E In-Reply-To: <877dauj23t.fsf@web.de> (Arne Babenhauserheide's message of "Thu, 20 Jan 2022 08:24:10 +0100") Received-SPF: pass client-ip=71.19.148.97; envelope-from=gdt@lexort.com; helo=s1.lexort.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21046 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Dr. Arne Babenhauserheide" writes: > Greg Troxel writes: > >> [[PGP Signed Part:Signature made by expired key 1FDA7AE8098ED60E Gregory= D. Troxel (low security, at work) ]] >> >> Maxime Devos writes: >> >>> Maybe the IPV6_V6ONLY (see the ipv6(7) man page) is relevant here. >>> Alternatively, you could run two servers in parallel: one bound to an >>> IPv4 address and another bound to an IPv6 address. >> >> My feeling is that IPV6_ONLY is best avoided, for portability, and >> because mapped addresses (an IPv6 address with the v4 address embedded) >> are awkward. So I think it's best to listen on v4 and v6 separately. > > I see portability, but for simplicity and having the same codebase, I > think that IPV6_V6ONLY=3D0 is the right choice. Make sure you add to your example pulling out the IPv4 address of connections and logging it reasonably (as a v4 address). I think it won't be so simple. > It is possible to listen both on v6 and v4 for the same port, but you=E2= =80=99ll > then have more complexity =E2=80=94 I=E2=80=99m mainly thinking about tut= orials here: > You=E2=80=99ll have to explain a lot more if you have to take care of v6 = vs. v4 > instead of having a library that does both. It's creating two sockets instead of one. A program that really works as to be able to do that anyway, because the user should be able to configure listen addresses to listen on some interfaces and not others. I also don't follow "library that does both". If a library has an option to create one socket, it should be extendable to do both in some straightforward way. My experience is that programs that are structured to allow multiple sockets are easy to make work, and those that don't end up awkward in various ways, so I'm encouraging you to address that root cause early. > An alternative could be a server using the fiberized web server to be > able to tie efficiently into the rest of the code via a plain fibers > channel. That sounds like what should really be addressed; the frameworks should allow "add this socket, add this other socket" and that should all be natural. Whether it's two interface addresses v4 only, or v4/v6, or v4, v6 and some future protocol. (BSD kernels used to have ISO and IPX at some point, and there's no V6ONLY type hack for those.) Thanks for listening... Greg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQS7wyAjWilQwVHG9Vsf2nroCY7WDgUCYell4gAKCRAf2nroCY7W DjiaAJ9jK0OeiM65blujmBLblfWe+WZ+ogCePNsxwJIl5maqpU3WCVUtJhbxTC4= =T9BQ -----END PGP SIGNATURE----- --=-=-=--