]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(network): don't assume prefix length 64 by default
authorMartin Wilck <mwilck@suse.com>
Fri, 3 Feb 2023 20:39:02 +0000 (21:39 +0100)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Mon, 13 Feb 2023 15:17:45 +0000 (16:17 +0100)
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

modules.d/40network/net-lib.sh

index 185df70a91c79ee5ef045c503ca66f0a079aac35..77d458d80b4b313ccf251c20c94047b227264339 100755 (executable)
@@ -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