The kdump will add the prefix "kdump-" before ethX in the 2nd kernel.
SSH client will store the peer known host key to the local file and the
link scope of ipv6 should append the netdevice to identify the address.
Thus we should correct the known host key if use the link scope of ipv6.
To make the function more clearly, rename it to
correct_ipv6_known_hosts, thus we can known it only for ipv6.
Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
---
dracut-kdump.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index e062665..52ebbdd 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -131,10 +131,11 @@ get_host_ip()
return 0
}
+# This function is only for ipv6
# kdump will change the ethernet device name in the 2nd using prefix "kdump-",
# the link scope of ipv6 has the format like fe80::5054:ff:fe48:ca80%eth0,
# So we should correct the known hosts
-correct_known_hosts()
+correct_ipv6_known_hosts()
{
if is_ipv6_target && is_ssh_dump_target; then
local _ipv6 _netdev _pre_netdev
@@ -196,7 +197,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
-correct_known_hosts
+correct_ipv6_known_hosts
if [ -z "$DUMP_INSTRUCTION" ]; then
add_dump_code "dump_fs $NEWROOT"
--
1.9.3