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 <andrefernandozanella.kantek@windriver.com>
This commit is contained in:
Andre Kantek 2023-11-14 15:45:14 -03:00
parent 79d8644b1e
commit 97052df958
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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