Bug 65415 - /etc/init.d/network is initializing ifcfg-*-range devices, but it shouldn't
Summary: /etc/init.d/network is initializing ifcfg-*-range devices, but it shouldn't
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
: 142461 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-23 16:20 UTC by Manfred Hollstein
Modified: 2014-03-17 02:27 UTC (History)
4 users (show)

Fixed In Version: 7.85-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-27 20:55:41 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:511 0 normal SHIPPED_LIVE Updated initscripts package 2004-12-21 05:00:00 UTC

Description Manfred Hollstein 2002-05-23 16:20:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.1 (X11; Linux i686; U;) Gecko/20020510

Description of problem:
I have the following files in /etc/sysconfig/network-scripts:

  ifcfg-cipcb0  ifcfg-cipcb1     
  ifcfg-eth0    ifcfg-eth0-range0 ifcfg-eth0-range1
  ifcfg-eth1    ifcfg-ppp0

There is some code in /etc/init.d/network which ought to:

  # find all the interfaces besides loopback.
  # ignore aliases, alternative configurations, and editor backup files

However, it doesn't ignore the -range files, hence initializing my
eth0 device three times - one can see three DHCPDISCOVER->DHCPOFFER->
DHCPREQUEST->DHCPACK loops for the same device in the DPCD's server
logs.

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

How reproducible:
Always

Steps to Reproduce:
1.Create a ifcfg-eth0 and a ifcfg-eth0-range1 file
2.Run service network start
3.
	

Actual Results:  You'll see something like

Bringing up interface eth0         [OK]
Bringing up interface eth0-range1  [OK]


Expected Results:  The explicit initialization of eth0-range1 should be suppressed.

Additional info:

The following small patch fixes the problem:

--- /etc/rc.d/init.d/network.orig       Sat Apr 13 05:43:00 2002
+++ /etc/rc.d/init.d/network    Thu May 23 18:01:00 2002
@@ -48,7 +48,7 @@ cd /etc/sysconfig/network-scripts
 
 # find all the interfaces besides loopback.
 # ignore aliases, alternative configurations, and editor backup files
-interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \
+interfaces=`ls ifcfg* | LANG=C egrep -v
'(ifcfg-lo|:|-range|rpmsave|rpmorig|rpmnew)' | \
            LANG=C egrep -v '(~|\.bak)$' | \
             LANG=C egrep 'ifcfg-[A-Za-z0-9_-]+$' | \
             sed 's/^ifcfg-//g'`

Comment 1 Need Real Name 2002-06-11 00:27:32 UTC
This can be a serious issue, because when eth0-range1 is configured as an 
interface of its own rather than as an alias range specification, it will NOT 
pick up the defaults from the eth0 file--and so various parameters (NETMASK, 
NO_ALIASROUTING setting, and so on) may be configured incorrectly.  In other 
words, it breaks parameter inheritance for alias ranges.

One workaround is to make sure that there's a character in the range file name 
that does not match the broken pattern in RH7.3's /etc/rc.d/init.d/network 
script.  For instance, if you rename ifcfg-eth0-range1 to ifcfg-eth0-range:1, 
you'll get the old (correct) behavior.


Comment 2 Charles Steinkuehler 2002-10-29 17:07:31 UTC
I ran into this bug when upgrading from 7.2 to 7.3.  The init scripts try to
bring up the "eth0-range0" interface, and do *NOT* import settings (such as
subnet mask) from the eth0 device.  This appears to be related to the change from:

LANG=C egrep -v 'ifcfg-cipcb[0-9]+$' | \
LANG=C egrep 'ifcfg-[a-z0-9]+$' | \

in the 7.2 /etc/init.d/network script to:

LANG=C egrep 'ifcfg-[A-Za-z0-9_-]+$' | \

in the 7.3 init scripts.  Note particularly the inclusion of the "-" or dash in
the 7.3 regexp, which will now match eth0-range0

Applying the previously posted patch, or simply removing the dash from the above
7.3 egrep line will fix the problem, and get my extra IP's configured with
appropriate subnet and broadcast settings.  Without modification, 7.3 brings up
the extra IP's with a /24 netmask, and *.*.*.255 broadcast IP. Config file
contents for reference:

[root@ada network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=216.171.153.132
NETMASK=255.255.255.192
ONBOOT=yes

[root@ada network-scripts]# cat ifcfg-eth0-range0
IPADDR_START="216.171.153.133"
IPADDR_END="216.171.153.134"
CLONENUM_START=0


Comment 3 John Caruso 2004-09-27 20:25:59 UTC
This continues to be broken in RedHat Enterprise Linux 3, with kernel 
2.4.21-15.0.4.ELsmp.  With the standard/unpatched startup scripts, 
having even one range file named in the standard fashion (e.g. ifcfg-
eth0-range10) can cause *all* IP addresses that are part of any of 
the other ranges on the system to be configured with incorrect 
netmasks, broadcast addresses, and so on.

This is a serious issue, RedHat, and very easy to fix.  So please do 
fix it.

I may file a separate bug for RHEL3 in the hopes that it will 
actually get some attention, considering that the fix is so 
straightforward and that this bug has been ignored for so long.


Comment 4 Bill Nottingham 2004-09-27 20:55:41 UTC
Added, will be in 7.85-1.

Comment 5 Robert Scheck 2004-10-02 17:26:33 UTC
Could this fix also be added to the RHEL3 initscripts, please?

Comment 6 Bill Nottingham 2004-12-09 21:52:24 UTC
*** Bug 142461 has been marked as a duplicate of this bug. ***

Comment 7 John Flanagan 2004-12-21 14:32:56 UTC
An advisory has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-511.html



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