Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2093675yba; Thu, 25 Apr 2019 10:29:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG+d9EhaVSrryRhsHtcMBggkDE5SkYKDKz8xUMO65UTdqqyOCNiXT/lZwxaYqHVg+GrchO X-Received: by 2002:a17:902:e208:: with SMTP id ce8mr26565103plb.99.1556213371336; Thu, 25 Apr 2019 10:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556213371; cv=none; d=google.com; s=arc-20160816; b=STFL7QTedya7y3zA5ycS+BCIx+/LJKO3Liy68LK5NKfp19HkO/B4Ym6ZgtpNnzwwlJ +tUjG+u6WMeZF3t8j/y4zy0qJO4EYdFMDNMexrboYavpvYruOCVBl9AnmW3wCCXbn3C2 QjocSAYG1v+euxcX7lF60hO6ypjWOwP1d5noFkzLN5y1yHeRZQLw7TTAXq9mVq7pIBI7 WD5kyR6ZwopTBZnwOHQGZxDVTqKeOVhw2LP2kQ2HbQxRJ2O/NEbYjtPQCSZ0iH3spFX8 AMaL3p8Gusc22Io3UUmpjJTfBgBbVguC/TQtSAuNUPi8MONQ00DeRU2CSyBnnTJamlIn /rqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=Tt5CQFKbzf9dCYvmnyPd/kvXBP0n84Z6An2ZNPiZ5pY=; b=ZQCIJQEIUxUPsR/09vkZmCtepUC+hGYDqCKARcWHmcTEukr/IH/iQPovMtlHu6J5yz uZIQZywG+yo+Q8V6ps8M2TpXanuUMGvHCqb+ZjsnVGeG1V+4EikolXBjp/AjHUxqOr6G UkFDE8kExGyHOEVhsEF0yGtVfXG7bmaAofAj6Yy0h8ycsRInkX7pZjgEBQsxeXvGIAbU 3bkZBn0jvITM4TjcUtapXUy9u7fKDJFTRo/gwbRrquatgmnbfNXXkPWNvb38qx19ryW+ FEPw0EDAZnZGMF5G14Tr6aHL32FW7dPvHkjLHpkJe3FGtWF1uUYxtOJ6cDATgqEKgLqF IewA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e36si6610969pgb.286.2019.04.25.10.29.15; Thu, 25 Apr 2019 10:29:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730883AbfDYLW7 (ORCPT + 99 others); Thu, 25 Apr 2019 07:22:59 -0400 Received: from mx.ungleich.ch ([185.203.112.16]:40238 "EHLO smtp.ungleich.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbfDYLW7 (ORCPT ); Thu, 25 Apr 2019 07:22:59 -0400 Received: from nico.schottelius.org (localhost [IPv6:::1]) by smtp.ungleich.ch (Postfix) with ESMTP id 0FC651FF02; Thu, 25 Apr 2019 13:22:57 +0200 (CEST) Received: by nico.schottelius.org (Postfix, from userid 1000) id F2EBC1A0100C; Thu, 25 Apr 2019 13:22:56 +0200 (CEST) References: <87pnpaqvk9.fsf@line.ungleich.ch> <20190425103033.GA20813@angband.pl> User-agent: mu4e 1.0; emacs 26.1 From: Nico Schottelius To: Adam Borowski Cc: linux-kernel@vger.kernel.org Subject: Re: How to turn off IPv4 without disabling IPv6 In-reply-to: <20190425103033.GA20813@angband.pl> Date: Thu, 25 Apr 2019 13:22:56 +0200 Message-ID: <87mukeqqgf.fsf@line.ungleich.ch> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Adam, thanks for the fast response. Adam Borowski writes: > On Thu, Apr 25, 2019 at 11:32:38AM +0200, Nico Schottelius wrote: >> running some IPv6 only >> networks. The systems in the IPv6 only networks do not need any IPv4 >> support anymore and thus for switches/routers we turned the support off. > >> Today we tried to turn off IPv4 in the Linux kernel at compile time. >> But it seems that as soon as we turn off CONFIG_INET, CONFIG_IPV6 is >> automatically turned off as well. > > Even if you don't want global nor even link-scope IPv4, way too many > programs assume that at least 127.0.0.1 (ie, lo) is working. They can't be > reconfigured to use ::1 without patching and rebuilding. I think we have to distinguish here between 2 kinds of programs: - stuff that listen()s - stuff that connect()s Afaics, the latter does not need any lo connectivity, neither v4 nor v6. It will use whatever IP address the kernel chooses for outgoing connections. For the former, I agree that there might be software that actually fails without having 127.0.0.1. However, if they bind to 0.0.0.0, the software will actually not work in IPv6 only network anyway. The big problem here is: if I cannot turn off IPv4, I cannot test what needs to be fixed. > [...] > That's an extra moving part where there was none before. Complexity is bad. > Having the IPv4 stack built just for the lo interface simplifies > things. I tend to disagree with this statement: turning off IPv4 first off all reduces complexity. You can even fully get rid of ARP. Yes, there will be the need for some changes / updates, but all of this can only be spotted once IPv4 is turned off. Best, Nico -- Your Swiss, Open Source and IPv6 Virtual Machine. Now on www.datacenterlight.ch.