Bug 32384 - /etc/init.d/network issues wrong route commands when reading static-routes
/etc/init.d/network issues wrong route commands when reading static-routes
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-20 07:50 EST by Jules Stuifbergen
Modified: 2014-03-16 22:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-20 07:50:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jules Stuifbergen 2001-03-20 07:50:28 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686)

in /etc/sysconfig/static routes the syntax to follow is:
any net netmask gw
any host gw

in /etc/init.d/network, it gets parsed incorrectly, yielding a bad 'route'

Code snippet:
grep "^any" /etc/sysconfig/static-routes | while read ignore type dest
netmask mask bogus args; do
              if [ "${bogus}" = "gw" ]; then 
                /sbin/route add -$type $dest $netmask $mask $args
                /sbin/route add -$type $dest $netmask $mask $bogus $args

The 'any net...' definition mentioned above will yield the following route

route add  -net netmask
which doesn't work. It misses the 'gw' between the netmask and the gateway.

Reproducible: Always
Steps to Reproduce:
1. create static route in static-routes using 'any' as device
2. start networking through initscript


Actual Results:  error-message: SIOCADDRT: No such device

Expected Results:  nothing

I'm using initscripts-5.49-1
Comment 1 Bill Nottingham 2001-03-20 12:15:23 EST
This should be fixed in the current rawhide initscripts.

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