From: Martin Wilck Date: Fri, 3 Feb 2023 20:39:02 +0000 (+0100) Subject: fix(network): don't assume prefix length 64 by default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ff255a4488f63cf84179d4572f44fe3a1bd29ec;p=thirdparty%2Fdracut.git fix(network): don't assume prefix length 64 by default Assuming a default prefix length of 64 by default if no explicit prefix length is given is wrong and known to cause connectivity problems in some networks. A prefix length of 128 should be assumed in this case. See https://www.rfc-editor.org/rfc/rfc5942 (specifically section 5) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684009 --- diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh index 185df70a9..77d458d80 100755 --- a/modules.d/40network/net-lib.sh +++ b/modules.d/40network/net-lib.sh @@ -311,7 +311,7 @@ ibft_to_cmdline() { [ -e "${iface}"/hostname ] && read -r hostname < "${iface}"/hostname if [ "$family" = "ipv6" ]; then if [ -n "$ip" ]; then - [ -n "$prefix" ] || prefix=64 + [ -n "$prefix" ] || prefix=128 ip="[${ip}]" mask=$prefix fi