kexec-tools/module-setup: Ensure eth devices get IP address for VLAN

Currently while trying to save vmcore via vlan eth interface, the Kdump
kernel fails with network unreachable message.

This is because mkdumprd produces a vlan config that does not get
ip address for vlan on eth device.

Fix the same via this patch.

Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Bhupesh Sharma 2020-01-17 02:14:32 +05:30 committed by Kairui Song
parent e3f2f926dd
commit a01270b64e

View File

@ -307,10 +307,10 @@ kdump_setup_vlan() {
exit 1
elif kdump_is_bond "$_phydev"; then
kdump_setup_bond "$_phydev"
echo " vlan=$_netdev:$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
echo " vlan=$(kdump_setup_ifname $_netdev):$_phydev" > ${initdir}/etc/cmdline.d/43vlan.conf
else
_kdumpdev="$(kdump_setup_ifname $_phydev)"
echo " vlan=$_netdev:$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
echo " vlan=$(kdump_setup_ifname $_netdev):$_kdumpdev ifname=$_kdumpdev:$_netmac" > ${initdir}/etc/cmdline.d/43vlan.conf
fi
}