Bug 32384 - /etc/init.d/network issues wrong route commands when reading static-routes
Summary: /etc/init.d/network issues wrong route commands when reading static-routes
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-20 12:50 UTC by Jules Stuifbergen
Modified: 2014-03-17 02:19 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Jules Stuifbergen 2001-03-20 12:50:28 UTC
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 17:15:23 UTC
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.