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
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2001-03-20 07:50:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 192.168.33.0 netmask 255.255.255.0 gw 172.16.2.33
any host 212.187.64.220 gw 172.16.2.33

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

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
              else
                /sbin/route add -$type $dest $netmask $mask $bogus $args
              fi
           done

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

route add  -net 192.168.33.0 netmask 255.255.255.0 172.16.2.33
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.