- Some of the ip route commands are not redirected to null. This causes the "FIB table does not exist" message from bug12763 - This patch makes all ip route commands get redirected to null, preventing the error message from being seen at boot. - One of the ip rule commands is not redirected to null. This causes the "RTNETLINK answers: no such file or directory" message. - This patch makes all ip rule commands get redirected to null, preventing the error message from being seen at boot. - Additional patches in this set ensure that all ip route and ip rule commands in all IPFire code is redirected to null unless the output of the ip route or ip rule command is used in a variable for use elsewhere in the code. - Tested on my vm system and confirmed that the fix in ipsec-interfaces stops the "FIB table does not exist" and "RTNETLINK answers: no such file or directory" messages during boot.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/scripts/ipsec-interfaces | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/scripts/ipsec-interfaces b/src/scripts/ipsec-interfaces index 23512b9bd..974d3ac84 100644 --- a/src/scripts/ipsec-interfaces +++ b/src/scripts/ipsec-interfaces @@ -107,15 +107,15 @@ main() { local interfaces=()
# Flush IPsec routes - ip route flush table "${ROUTE_TABLE}" + ip route flush table "${ROUTE_TABLE}" >/dev/null 2>&1
# Remove lookups - ip rule del lookup "${ROUTE_TABLE}" + ip rule del lookup "${ROUTE_TABLE}" >/dev/null 2>&1
# We are done when IPsec is not enabled if [ "${ENABLED}" = "on" ]; then # Enable route table lookup - ip rule add lookup "${ROUTE_TABLE}" prio "${ROUTE_TABLE_PRIO}" + ip rule add lookup "${ROUTE_TABLE}" prio "${ROUTE_TABLE_PRIO}" >/dev/null 2>&1
while IFS="," read -r "${VARS[@]}"; do # Check if the connection is enabled @@ -158,7 +158,7 @@ main() {
log "Creating route to ${rightsubnet} (via ${address} and ${RED_INTF})" ip route add table "${ROUTE_TABLE}" "${rightsubnet}" proto static \ - dev "${RED_INTF}" src "${address}" + dev "${RED_INTF}" src "${address}" >/dev/null 2>&1 done
# No interface processing required
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot. - Tested on my vm system and confirmed that the fix in ipsec-interfaces stops the "FIB table does not exist" and "RTNETLINK answers: no such file or directory" messages during boot.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/system/static-routes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/initscripts/system/static-routes b/src/initscripts/system/static-routes index 85785e9af..9aacc8db5 100644 --- a/src/initscripts/system/static-routes +++ b/src/initscripts/system/static-routes @@ -29,14 +29,14 @@ function init_table() { return fi
- ip rule add table static + ip rule add table static >/dev/null 2>&1 }
function create_all_routes() { local file=${1} shift
- # Remote all routes. + # Remove all routes. ip route flush table static >/dev/null 2>&1
local status @@ -54,7 +54,7 @@ function create_all_routes() { continue fi
- ip route add ${network} via ${gateway} table static proto static + ip route add ${network} via ${gateway} table static proto static >/dev/null 2>&1 done < ${file} }
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/networking/red | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index beb665e5f..51bf95a43 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -129,10 +129,10 @@ case "${1}" in touch /var/ipfire/red/active
# Create route to default gateway - ip route add ${GATEWAY} dev ${DEVICE} + ip route add ${GATEWAY} dev ${DEVICE} >/dev/null 2>&1
boot_mesg "Setting up default gateway ${GATEWAY}..." - ip route add default via ${GATEWAY} dev ${DEVICE} + ip route add default via ${GATEWAY} dev ${DEVICE} >/dev/null 2>&1 evaluate_retval
if [ -d "/sys/class/net/${DEVICE}" ]; then
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/ppp/ip-up | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ppp/ip-up b/src/ppp/ip-up index 2e636e72d..5f4ee7726 100644 --- a/src/ppp/ip-up +++ b/src/ppp/ip-up @@ -33,7 +33,7 @@ echo -n "$4" > /var/ipfire/red/local-ipaddress echo -n "$5" > /var/ipfire/red/remote-ipaddress touch /var/ipfire/red/active
-/sbin/ip route replace default via ${IPREMOTE} dev ppp0 +/sbin/ip route replace default via ${IPREMOTE} dev ppp0 >/dev/null 2>&1 run_subdir ${rc_base}/init.d/networking/red.up/
#Check if gateway has answerd to ping, if not replace with ping.ipfire.org
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/helper/aws-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/initscripts/helper/aws-setup b/src/initscripts/helper/aws-setup index f14f4eb57..0bcf75572 100644 --- a/src/initscripts/helper/aws-setup +++ b/src/initscripts/helper/aws-setup @@ -278,7 +278,7 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
# Add the default route - ip route add default via "${new_routers}" + ip route add default via "${new_routers}" >/dev/null 2>&1
# Setup DNS for domain_name_server in ${new_domain_name_servers}; do
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/helper/azure-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/initscripts/helper/azure-setup b/src/initscripts/helper/azure-setup index 7a4422a35..eff963a4b 100644 --- a/src/initscripts/helper/azure-setup +++ b/src/initscripts/helper/azure-setup @@ -298,7 +298,7 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
# Add the default route - ip route add default via "${new_routers}" + ip route add default via "${new_routers}" >/dev/null 2>&1
# Setup DNS for domain_name_server in ${new_domain_name_servers}; do
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/helper/exoscale-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/initscripts/helper/exoscale-setup b/src/initscripts/helper/exoscale-setup index 02fdda2a3..acf5e4e4b 100644 --- a/src/initscripts/helper/exoscale-setup +++ b/src/initscripts/helper/exoscale-setup @@ -227,7 +227,7 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
# Add the default route - ip route add default via "${new_routers}" + ip route add default via "${new_routers}" >/dev/null 2>&1
# Setup DNS for domain_name_server in ${new_domain_name_servers}; do
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/helper/gcp-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/initscripts/helper/gcp-setup b/src/initscripts/helper/gcp-setup index 4f5148c3e..8273b70b4 100644 --- a/src/initscripts/helper/gcp-setup +++ b/src/initscripts/helper/gcp-setup @@ -268,8 +268,8 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
# Add the default route - ip route add "${new_routers}" dev "${interface}" - ip route add default via "${new_routers}" + ip route add "${new_routers}" dev "${interface}" >/dev/null 2>&1 + ip route add default via "${new_routers}" >/dev/null 2>&1
# Setup DNS for domain_name_server in ${new_domain_name_servers}; do
- This ensures that all ip route and ip rule commands are redirected to null if the output is not used to feed into a variable. - This will prevent any error messages related to empty iproute tables being displayed during boot if an empty table is accessed.
Fixes: Bug#12763 Tested-by: Adolf Belka adolf.belka@ipfire.org Signed-off-by: Adolf Belka adolf.belka@ipfire.org --- src/initscripts/helper/oci-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/initscripts/helper/oci-setup b/src/initscripts/helper/oci-setup index 312014b74..727537343 100644 --- a/src/initscripts/helper/oci-setup +++ b/src/initscripts/helper/oci-setup @@ -304,8 +304,8 @@ case "${reason}" in ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
# Add the default route - ip route add "${new_routers}" dev "${interface}" - ip route add default via "${new_routers}" + ip route add "${new_routers}" dev "${interface}" >/dev/null 2>&1 + ip route add default via "${new_routers}" >/dev/null 2>&1
# Setup DNS for domain_name_server in ${new_domain_name_servers}; do