From 97052df958d845108349f7bc9d40833bc3efe446 Mon Sep 17 00:00:00 2001 From: Andre Kantek Date: Tue, 14 Nov 2023 15:45:14 -0300 Subject: [PATCH] After executing PXE boot install, turn off IPv6 autoconf It was detected that the PXE boot the IPv6 autoconf is turned on due to an error in the network config file for the PXE interface. Instead of applying the config to the interface it is configuring the loopback. By leaving autoconf turned on the interface it can receive unwanted address configuration that can create errors during the ansible playbook execution that will follow. Closes-Bug: 2043509 Change-Id: I48584dc6b92fca02205c4774c4624410b6a29ba8 Signed-off-by: Andre Kantek --- kickstart/files/kickstart.cfg | 2 +- kickstart/files/miniboot.cfg | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index 2e948d25..62e4375b 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -2602,7 +2602,7 @@ if [ $mgmt_dev != "lo" ]; then cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-$mgmt_dev auto $mgmt_dev iface $mgmt_dev inet dhcp - post-up echo 0 > /proc/sys/net/ipv6/conf/lo/autoconf; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/lo/accept_redirects + post-up echo 0 > /proc/sys/net/ipv6/conf/$mgmt_dev/autoconf; echo 0 > /proc/sys/net/ipv6/conf/$mgmt_dev/accept_ra; echo 0 > /proc/sys/net/ipv6/conf/$mgmt_dev/accept_redirects EOF fi diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index 136a953e..35ec2781 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -2772,9 +2772,9 @@ function create_network_interface_file() output="${output} gateway $BOOTPARAM_GW\n" fi output="${output} mtu 1500\n" - output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/lo/autoconf\n" - output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/lo/accept_ra\n" - output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/lo/accept_redirects\n" + output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/${ifname}/autoconf\n" + output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/${ifname}/accept_ra\n" + output="${output} post-up echo 0 > /proc/sys/net/${ipversion}/conf/${ifname}/accept_redirects\n" echo -e "${output}" > "${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-${ifname}" else # CONFIGURE FOR VLAN