Change CONFIG_IPV4 from hidden 'def_bool y' into an exposed boolean. This allows users to explicitly disable IPv4 via Kconfig to build IPv6-only. The default is kept at 'INET' to prevent breaking existing configurations. Signed-off-by: Fernando Fernandez Mancera --- Sashiko: Yes, disabling IPV4 will currently disable many relevant kernel modules. I acknowledge that in the cover letter. This is just an introductory series and many patches will follow-up so we can respect the 15~ patches series in netdev. I have more work prepared to send once this is merged. --- net/ipv4/Kconfig | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index f34e31f06c7f..8b7f4a0613fb 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -3,7 +3,15 @@ # IP configuration # config IPV4 - def_bool y + bool "The IPv4 protocol" if IPV6 + default INET + help + Support for IP version 4 (IPv4). + + Disabling this option compiles the kernel networking stack without + IPv4 support, resulting in a IPv6-only system. + + If unsure, say Y. config IP_MULTICAST bool "IP: multicasting" -- 2.56.1