Skip to content

Commit c3b65a4

Browse files
mwilckaafeijoo-suse
authored andcommitted
fix(iscsi): prefix syntax for static iBFT IPv6 addresses
ibft_to_cmdline() formats a static IPv6 address like this (without peer, gateway, hostname): ip="[fd09:9a46:b5c1:1fe:1::10/64]:::::ibft0:none" This means that the "mask" field (4th) is left blank. When this is parsed later by parse-ip-opts.sh, it bails out with the error message "Sorry, automatic calculation of netmask is not yet supported". parse-ip-opts.sh rather expects the prefix in the 4th field: ip="[fd09:9a46:b5c1:1fe:1::10]:::64::ibft0:none" This syntax will be correctly transformed to the command ip addr add fd09:9a46:b5c1:1fe::10/64 dev ibft0 This patch fixes the formatting of the "ip=" line in ibft_to_cmdline().
1 parent aa5d952 commit c3b65a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ ibft_to_cmdline() {
312312
if [ "$family" = "ipv6" ]; then
313313
if [ -n "$ip" ]; then
314314
[ -n "$prefix" ] || prefix=64
315-
ip="[${ip}/${prefix}]"
316-
mask=
315+
ip="[${ip}]"
316+
mask=$prefix
317317
fi
318318
if [ -n "$gw" ]; then
319319
gw="[${gw}]"

0 commit comments

Comments
 (0)