diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index ddea0193..dbbf1436 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -2012,6 +2012,40 @@ else ilog "Enable LAT ${gpg_option} option to configure ostree for unverified GPG (gpg-verify=false)" fi +# +# Disable IPV6 Route Advertisement during install if enabled +# +_autoconf=$(cat /proc/sys/net/ipv6/conf/all/autoconf) +_accept_ra=$(cat /proc/sys/net/ipv6/conf/all/accept_ra) +_accept_redirects=$(cat /proc/sys/net/ipv6/conf/all/accept_redirects) + +ilog "IPV6 Route Advertisement settings : autoconf=${_autoconf}, accept_ra=${_accept_ra}, accept_redirects=${_accept_redirects} (all interfaces)" + +change=false +if [ ${_autoconf} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/autoconf + _autoconf=$(cat /proc/sys/net/ipv6/conf/all/autoconf) + change=true +fi + +if [ ${_accept_ra} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra + _accept_ra=$(cat /proc/sys/net/ipv6/conf/all/accept_ra) + change=true +fi + +if [ ${_accept_redirects} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/accept_redirects + _accept_redirects=$(cat /proc/sys/net/ipv6/conf/all/accept_redirects) + change=true +fi + +if [ "${change}" = true ] ; then + ilog "IPV6 Route Advertisement disabled : autoconf=${_autoconf}, accept_ra=${_accept_ra}, accept_redirects=${_accept_redirects}" +else + ilog "... no changes required" +fi + # Stage the ostree_repo in /sysroot for network installations # of controller nodes. Doing so avoids a double ostree pull of # the huge ostree_repo over the network. diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index 3a62bd54..b2dc96c0 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -2070,6 +2070,40 @@ udevadm settle --timeout=300 || report_failure_with_msg "udevadm settle failed" # Rescan LVM cache to avoid warnings for VGs that were recreated. pvscan --cache 2>/dev/null +# +# Disable IPV6 Route Advertisement during install if enabled +# +_autoconf=$(cat /proc/sys/net/ipv6/conf/all/autoconf) +_accept_ra=$(cat /proc/sys/net/ipv6/conf/all/accept_ra) +_accept_redirects=$(cat /proc/sys/net/ipv6/conf/all/accept_redirects) + +ilog "IPV6 Route Advertisement settings : autoconf=${_autoconf}, accept_ra=${_accept_ra}, accept_redirects=${_accept_redirects} (all interfaces)" + +change=false +if [ ${_autoconf} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/autoconf + _autoconf=$(cat /proc/sys/net/ipv6/conf/all/autoconf) + change=true +fi + +if [ ${_accept_ra} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra + _accept_ra=$(cat /proc/sys/net/ipv6/conf/all/accept_ra) + change=true +fi + +if [ ${_accept_redirects} -ne 0 ] ; then + echo 0 > /proc/sys/net/ipv6/conf/all/accept_redirects + _accept_redirects=$(cat /proc/sys/net/ipv6/conf/all/accept_redirects) + change=true +fi + +if [ "${change}" = true ] ; then + ilog "IPV6 Route Advertisement disabled : autoconf=${_autoconf}, accept_ra=${_accept_ra}, accept_redirects=${_accept_redirects}" +else + ilog "... no changes required" +fi + # Stage the ostree_repo in /sysroot for network installations # of controller nodes. Doing so avoids a double ostree pull of # the huge ostree_repo over the network.