This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 110205 - ifup-routes doesn't set routes properly
ifup-routes doesn't set routes properly
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
1
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-16 20:26 EST by Brett Johnson
Modified: 2014-03-16 22:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-16 21:52:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Brett Johnson 2003-11-16 20:26:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.1.4322)

Description of problem:
The ifup-routes script isn't accessing the correct location for route 
info.  I believe it should be looking for interface specific routing 
settings in /etc/sysconfig/networking/devices/ but instead the script 
looks in /etc/sysconfig/network-scripts/

The offending line is:

CONFIG="/etc/sysconfig/network-scripts/$NICK.route"

I think it should be:

CONFIG="/etc/sysconfig/networking/devices/$NICK.route"

This may not be the only problem as the Redhat network config tool 
saves the routes in the old format of route-eth0.  Also, the network 
config tool won't delete a route properly.  I'll report that 
somewhere under the correct heading.


Version-Release number of selected component (if applicable):
7.42-1

How reproducible:
Always

Steps to Reproduce:
1.Add a static route in webmin for eth0
2.Do service network restart
3.Do route and see that no static route has been added
    

Additional info:
Comment 1 Bill Nottingham 2003-11-17 15:23:12 EST
AFAIK, the network config tool is supposed to be putting $NICK.route
directly into /etc/sysconfig/network-scripts.
Comment 2 Brett Johnson 2003-11-17 22:55:51 EST
I thought that might be a possibility, but, I checke Redhat 8 and 9 
and both ifup-routes scripts expect to find eth0.route 
in /etc/sysconfig/networking/devices.
I noticed that the scripts have an older format and the new Redhat 
format that it can use.

Older format uses /etc/sysconfig/network-scripts/route-eth0
New format uses /etc/sysconfig/networking/devices/eth0.route

I believe the new format is used in order to support multiple network 
profiles in the network configuration utility.

Comment 3 James Fairbairn 2003-12-18 04:30:10 EST
The problem in the ifup-routes script in FC1 is not that it's 
looking in the wrong directory; .../network-scripts is where the 
system puts the config files for the currently-active network 
profile, so this is correct. 
 
The problem appears to be to do with the new format of 
route-<interface> file, which expects the following sytax: 
 
ADDRESS0=10.0.0.0 
NETMASK0=255.255.255.0 
GATEWAY0=10.0.1.254 
 
The ip route add command expects syntax like this: 
 
ip route add 10.0.0.0/24 via 10.0.1.254 dev <interface> 
 
The ifup-routes script has to convert the $NETMASK0 variable (here, 
255.255.255.0) to the short form of the bitmask (here, 24). It even 
goes as far as running ipcalc -p to get this information (line 13), 
and using a variable called $PREFIX (line 14). 
 
Unfortunately the $PREFIX variable is never actually set, so the ip 
route command runs as follows: 
 
ip route add 10.0.0.0/ via 10.0.1.254 
 
So the ifup-routes script needs to be fixed so that it properly 
assigns the $PREFIX variable. 
 
Note that there is currently a workaround. The ifup-routes script 
supports a different (older) format of the route-<interface> file. 
Just put your routes into the route-<interface> file in the format 
expected by the ip route add command, i.e. 
 
10.0.0.0/24 via 10.0.1.254 
 
Not sure whether this will be blown away the next time you run neat 
or webmin, though. 
 
I'm 
Comment 4 James Fairbairn 2003-12-18 04:39:39 EST
Oops, scratch that last comment completely! ifup-routes appears to 
work correctly in my installation. How embarrassing.... :) 
Comment 5 Bill Nottingham 2004-03-16 21:52:56 EST
If webmin is writing into networking/devices, that's a webmin bug.

Note You need to log in before you can comment on or make changes to this bug.