Skip to content

Commit

Permalink
fix(network): don't assume prefix length 64 by default
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mwilck authored and aafeijoo-suse committed Feb 13, 2023
1 parent c3b65a4 commit 7ff255a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/40network/net-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7ff255a

Please sign in to comment.