From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.devel Subject: Re: (web server) serving on both ipv6 and ipv4? Date: Wed, 19 Jan 2022 13:44:13 +0000 Message-ID: <20220119134413.20b5d9944b9bbf51b198b948@gmail.com> References: <87k0ewi0w2.fsf@web.de> <20220119130733.fe13d5f14bd2a818266ddc10@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27801"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Jan 19 15:32:48 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 1nAC12-00076Q-3l for guile-devel@m.gmane-mx.org; Wed, 19 Jan 2022 15:32:48 +0100 Original-Received: from localhost ([::1]:54440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAC11-0002Iw-7M for guile-devel@m.gmane-mx.org; Wed, 19 Jan 2022 09:32:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nABGG-0002im-Ea for guile-devel@gnu.org; Wed, 19 Jan 2022 08:44:28 -0500 Original-Received: from [2a00:1450:4864:20::52c] (port=35732 helo=mail-ed1-x52c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nABGD-0003Ww-9R for guile-devel@gnu.org; Wed, 19 Jan 2022 08:44:28 -0500 Original-Received: by mail-ed1-x52c.google.com with SMTP id f17so3306529edw.2 for ; Wed, 19 Jan 2022 05:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=eRifDWFbOEjuzVO1IRY0VdrGhFmQRHBiI0apHBDhO3U=; b=XqoxqrP/HwiEVfn0B/YcarYoWU2vBmf41jctRb8RuIrOobHD+RWcIcCcpVGYaZLk4V GdlbbC9+O8/UgSM8Lz/4YeXl57jYxmd+lBj14JPRYyJVSQ6gk+ogbQUhAAowMhvHNgiS qgHkE3AOPFAUEANL8Rcb8ha9ZfTqNAJv007BEZ6+kNuwPf2ceN4wrc8vvcdvSUWqTo+F Hv9Oot7BWk4iTjY1oH9FuRp1O3SJkaZTKvnNO4FlfP5v2CuXSsCEVRZqEpJtY930Flh1 GB0v2FjIio9mXBcURIEcNMKPsNc2FJDwjnWwkxpxPuKm6PXrj6ONI3OD1i+COwxItroz uaJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eRifDWFbOEjuzVO1IRY0VdrGhFmQRHBiI0apHBDhO3U=; b=WLaRgz7dxspfOlNjMuI6cC2HTadpp31fQVBDV70jRv2gBmyurB+KZvteAg+YcTZYPt BTtuwsuovX3Pj5UqQphiJli78pBwMBzU63pjX+uiQudaoleKKmZoJKlG+/bbjVn05qr0 lrt7mFVvP2Whzv9x4tEmph1hEnYuvyoP0MTCNUr7tb0MwwbvPuNS4G92aD5sNNgUoFtc iHgZ9YgRBarxBiDb/7kdcU3vYiDJwV24ym65vxqoz7aNc1zxBjIGT6WS4/GmPEogTC4p NqNqwDPvJ4zC/12+/OP0bffdsJ0vLiL0Pgebv/0gxaPqOL6iigtBuB5opq/s+2wjShZ8 DUNA== X-Gm-Message-State: AOAM5327v+yM65nzScrPNNn3qI6ta643ws0tTZNn66qTN2PzRX03cqxO 2gG9284kBDzBQU6Y6S+Rjg1X0IUpSGM= X-Google-Smtp-Source: ABdhPJyUgcQ1798BKO6UnpM06VoDVcF2hHAnO/5T6k7BK37huqAkp3A/eoyqZb5jQ5Q3MlN8mjP+qg== X-Received: by 2002:a05:600c:1e26:: with SMTP id ay38mr3707253wmb.47.1642599841502; Wed, 19 Jan 2022 05:44:01 -0800 (PST) Original-Received: from bother.homenet ([2.27.184.177]) by smtp.gmail.com with ESMTPSA id x8sm18700491wru.102.2022.01.19.05.44.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 05:44:01 -0800 (PST) Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with SMTP id 9B2872637CA for ; Wed, 19 Jan 2022 13:44:13 +0000 (GMT) In-Reply-To: <20220119130733.fe13d5f14bd2a818266ddc10@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-unknown-linux-gnu) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=vine35792468@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:21037 Archived-At: On Wed, 19 Jan 2022 13:07:33 +0000 Chris Vine wrote: [snip] > As I understand it, with linux IPv6 sockets are dual stack capable, and > in earlier kernel versions this was be enabled by default. I believe > with current versions that is no longer the case, and that you have to > specifically enable dual stack by turning off IPV6_V6ONLY using > setsockopt before binding on the socket. > > Then, if receiving a IPv4 connection from address 1.2.3.4, this would be > mapped as ::::ffff:1.2.3.4. > > I do not know about other OSes. I have half a memory that some earlier > versions of windows did not support dual stack sockets (XP?). By the way I did use dual stack some years ago, and I cannot now remember all the details, but I think I may have had to bind on in6addr_any (which in dual stack would cover INADDR_ANY) or on :: (which would cover 127.0.0.1) to get dual stack to work. I suggest you play around with it to see. One other correction: when I said there was a mapping to ::::ffff: 1.2.3.4 I meant ::ffff:1.2.3.4.