Description of problem: network-scripts 10.13 Update changed the handling of routes from a route-<interface> file. Now any route coming from such a file triggers the ip route add Error: any valid prefix is expected rather than "..." Reason is, that the ip route add command in ifup-routes handle_file function now encloses the $line variable in double quotes. In v10.11 the route was added without them. The ip command now interpretes the complete route as it's first command line parameter, which is incorrect Here are the problematic changes: --- ifup-routes.R 2021-08-27 09:55:06.000000000 +0200 +++ ifup-routes 2022-01-13 09:08:43.000000000 +0100 @@ -2,6 +2,8 @@ # # adds static routes which go through device $1 +. /etc/sysconfig/network-scripts/network-functions + if [ -z "$1" ]; then echo $"usage: ifup-routes <net-device> [<nickname>]" exit 1 @@ -19,7 +21,12 @@ line="$line via $(eval echo '$'GATEWAY$routenum)" fi line="$line dev $2" - /sbin/ip route add $line + + /sbin/ip route add "$line" || { + net_log $"Failed to add route ${line}, using ip route replace instead." warning + /sbin/ip route replace "$line" + } + routenum=$(($routenum+1)) done } @@ -34,7 +41,10 @@ fi { cat "$file" ; echo ; } | while read line; do if [[ ! "$line" =~ $MATCH ]]; then - /sbin/ip $proto $type add $line + /sbin/ip $proto "$type" add "$line" || { + net_log $"Failed to add ${type} ${line}, using ip ${type} replace instead." warning + /sbin/ip $proto "$type" replace "$line" + } fi done } Version-Release number of selected component (if applicable): network-scripts 10.13 How reproducible: ifup-routes <interface> Steps to Reproduce: 1. add routes via ifup-routes 2. or restart system 3. Actual results: No static routes are added at all. Expected results: Static routes are added. Additional info:
Hi, I'm aware of this issue and I'm working on solution.
The fix is simple. Just remove the double quotes around the $line variable. This restores the previous behaviour from v10.11. I've already done this in my installation and tested it successfully.
FEDORA-2022-850adec1a6 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-850adec1a6
FEDORA-2022-850adec1a6 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-850adec1a6` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-850adec1a6 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
version 10.14 works again.
FEDORA-2022-850adec1a6 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.