Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1822432yba; Thu, 25 Apr 2019 06:20:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyh6jozsI1ufRdNwd/uF4KR+N9UXEnmCOfyKMhCRf5E0vbR8NCEpCg/qQ2qTk9VH1dhjMZJ X-Received: by 2002:a17:902:f08a:: with SMTP id go10mr38389958plb.121.1556198447351; Thu, 25 Apr 2019 06:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556198447; cv=none; d=google.com; s=arc-20160816; b=0fQoGOVUDr3xXNJVVyVPGyTv++RB0dzdEgh/DP7N0ToVFzQ3O79KNKWt/0SOuwHB6S XeIi+u8U/3EEGu3ajMcsXYusG3eaaPuFxOmrUPXGKrm8V1tav+LJMgsLP3NZOsgac+hc 26mkIty3G3aZ1F2D1VdsTjR0t0BO2bbrwrgd57wUGowam12+Pmlbw14tDCxizUBpw8em gcrDMXJASXD6Bp36bs7LLPIyuThjIF7MTLjNaPyA1SYsFusy4W9ndFdOfGcK3g3KW3BC 7z4GPn41hKFv/3Whp+4jHuuZcJlswX5uScwB3e9D531wrg91CVIqnqZY2DW6oPY9G25Z fkUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=CfNSm6Yx2WFkA/rHIAyOFJ1IipvXq06RHGK8XqO4S1g=; b=TIYVI7vLPWwvIDowVW7NPenkZTyIGaUFgu6UQVs+EZ4WtYGdBxvQREaogSTEYTe43x BEo4xvM9Jh1Va/zLzYZ/cdckvwzEb55t47+sgOeR82+5t26RaDOmY8B68oKil2TX0EFN NyprcZoKyf/a7yu+TNX8EeRjuwPSv6OA7bAPENbet+zvnsQpoXWx8AXWV/RBKwgYaiLa VNDk5MbeWrsYoyROztiLrR1hU8FXkAazoyexUDiIWx+sbsF5+0hOlk202ZNHvT8mGe18 Qsqffv2bebmK/WvfmwB1EovznPR3gZfsLFg7ig2DS9FI/V4CvYBSIEalWQNspjkoBlJj uklA== 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 v2si22363982pgh.356.2019.04.25.06.20.30; Thu, 25 Apr 2019 06:20:47 -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 S1730339AbfDYKag (ORCPT + 99 others); Thu, 25 Apr 2019 06:30:36 -0400 Received: from tartarus.angband.pl ([54.37.238.230]:58028 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfDYKag (ORCPT ); Thu, 25 Apr 2019 06:30:36 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1hJbeD-0005xy-UO; Thu, 25 Apr 2019 12:30:33 +0200 Date: Thu, 25 Apr 2019 12:30:33 +0200 From: Adam Borowski To: Nico Schottelius Cc: linux-kernel@vger.kernel.org Subject: Re: How to turn off IPv4 without disabling IPv6 Message-ID: <20190425103033.GA20813@angband.pl> References: <87pnpaqvk9.fsf@line.ungleich.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87pnpaqvk9.fsf@line.ungleich.ch> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > Coming back to my original question: is there a way or how would we turn > off IPv4 support in the Linux kernel? I believe this is not worth your time for today. Just do what IPv6-haters do on stock modern distros: have no routes for the other IP version configured; non-buggy programs will do the right thing. This seems to work well. Heck, I had a busy dev server with broken IPv4, I didn't notice that for 1.5 years until I tried to pull something directly from Github (which is still v4 only). You're a network admin so you know far more than me wrt anything that goes over the wire -- but as as a distro developer/user, I'd say there's a considerable cost to have every of tens of thousands programs shipped by a distro, and many more that are private to a company/university/etc, updated to autodetect how to access "localhost" on a particular box. 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. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8" ⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs? ⠈⠳⣄⠀⠀⠀⠀