[PATCH] base-files: Don't enable ULA IPv6 addresses by default in new config

Baptiste Jonglez baptiste at bitsofnetworks.org
Thu Sep 8 06:58:04 PDT 2022


From: Baptiste Jonglez <git at bitsofnetworks.org>

ULA IPv6 prefixes (Unique Local Addresses, RFC 4193) are not routable on
the Internet.  As such, they have very limited use, and enabling them by
default causes more problems than it solves:

- if an OpenWrt device already has external IPv6 connectivity with
  globally routable addresses, then ULA addresses are not useful.

- if an OpenWrt device has no external IPv6 connectivity, then ULA
  addresses could be useful for local IPv6 communication on the LAN;
  however, link-local IPv6 addresses already provide such a service
  without needing any configuration or even the need for a router.
  Discovery protocols based on IPv6 multicast and link-local addresses are
  becoming more common (e.g. syncthing) and don't need ULA to work.

- users might be confused to see multiple unrelated IPv6 addresses on
  their devices.  Or they might wrongly conclude that they have IPv6
  connectivity thanks to ULA addresses, while in fact ULA addresses are
  not globally routable.

- there have been various bug reports [1, 2, 3] in 19.07 and 21.02 where
  ULA addresses basically break global IPv6 connectivity.  These bugs have
  not been solved in several years, indicating a probable lack of interest
  for ULA from the OpenWrt developer community.

ULA addresses are still supported, e.g. by setting
network.globals.ula_prefix='auto' in a uci-defaults script that runs
before "12_network-generate-ula", or by directly setting
network.globals.ula_prefix to a /48 prefix.

[1] https://github.com/openwrt/openwrt/issues/5082
[2] https://forum.openwrt.org/t/router-can-use-ipv6-ok-but-clients-in-lan-cannot/57587
[3] https://lafibre.info/ipv6/saison-2-openwrt-slaac-problemes/

Signed-off-by: Baptiste Jonglez <git at bitsofnetworks.org>
---
 package/base-files/files/bin/config_generate | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
index 596fcf41fa..f0ea4b6eb2 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -45,13 +45,6 @@ generate_static_network() {
 		set network.loopback.ipaddr='127.0.0.1'
 		set network.loopback.netmask='255.0.0.0'
 	EOF
-		[ -e /proc/sys/net/ipv6 ] && {
-			uci -q batch <<-EOF
-				delete network.globals
-				set network.globals='globals'
-				set network.globals.ula_prefix='auto'
-			EOF
-		}
 
 	if json_is_a dsl object; then
 		json_select dsl
-- 
2.30.2




More information about the openwrt-devel mailing list