Skip to content

Commit 21de564

Browse files
authored
Merge pull request #1035 from oalbrigt/findif-improve-ipv6-nic-detection
findif: improve IPv6 NIC detection
2 parents 5cc80e8 + 10a0cdb commit 21de564

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

heartbeat/findif.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ findif()
233233
fi
234234
case $1 in
235235
*/*) : OK ;;
236+
# "ip route" doesnt show netmask for IPv6 /128
237+
*:*:*) : OK ;;
236238
*)
237239
ocf_log err "Unable to find cidr_netmask."
238240
return $OCF_ERR_GENERIC ;;
@@ -248,7 +250,7 @@ findif()
248250
fi
249251
fi
250252
else
251-
if [ -z "$OCF_RESKEY_nic" -a "$netmask" != "${1#*/}" ] ; then
253+
if [ -z "$OCF_RESKEY_nic" ] && [ -z "$OCF_RESKEY_cidr_netmask" ] && [ "$netmask" != "${1#*/}" ] ; then
252254
ocf_log err "Unable to find nic, or netmask mismatch."
253255
return $OCF_ERR_GENERIC
254256
fi

0 commit comments

Comments
 (0)