Bug 208414

Summary: ifup-aliases does not check if IP is in use before bringing up IP alias
Product: Red Hat Enterprise Linux 4 Reporter: Riaan van Niekerk <riaanvn>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: bjoshi
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-25 11:25:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch for this issue. none

Description Riaan van Niekerk 2006-09-28 14:07:02 UTC
Description of problem:

/etc/sysconfig/network-scripts/ifup-alias does not check if an IP is already up
before assinging an IP to an alias interface

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

initscripts-7.93.25.EL-1

How reproducible:

every time

Steps to Reproduce:
1. configure machine 1 with IP of 192.168.0.1 in ifcfg-eth0

2. configure machine 2 with any other IP in ifcfg-eth0 and IP Alias of
192.168.0.1 in ifcfg-eth0:0 :
DEVICE=eth0:0
ONPARENT=yes
IPADDR=192.168.0.1
NETMASK=255.255.255.0

3. Restart networking on machine 2

Actual results:

machine 2 will have eth0:0 with the same IP as eth0 on machine 2

Expected results:

Error, some other host already uses address 192.168.0.1

Additional info:

The arping code which is in /sbin/ifup is non-existent in
/etc/sysconfig/network-scripts/ifup-alias

Comment 1 bhargav joshi 2006-10-12 15:37:10 UTC
For network script not to ignonre aliases
Edit /etc/rc.d/init.d/network 

replace 

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' |
            sed 's/[0-9]/ &/' | LANG=C sort -k 1,1 -k 2n | sed 's/ //'`


by

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\:\._-]+$' | \

Comment 2 Bill Nottingham 2006-10-12 15:39:37 UTC
That's not the right answer. Aliases are brought up by ifup-aliases, not
/etc/init.d/network.

Comment 5 Jose Plans 2006-10-31 11:43:03 UTC
Created attachment 139840 [details]
proposed patch for this issue.

This fixes the problem for me, I've didn't exit it as it would remove the next
secondary interfaces.

Comment 10 RHEL Program Management 2007-11-29 04:24:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 13 Phil Knirsch 2008-02-12 13:50:34 UTC
This request was evaluated by Red Hat Engineering for inclusion in a Red
Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat Enterprise
Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in
response to customer and partner requirements, Red Hat takes a conservative
approach when evaluating enhancements for inclusion in maintenance updates
for currently deployed products. The primary objectives of update releases
are to enable new hardware platform support and to resolve critical
defects.

However, Red Hat will further review this request for potential inclusion
in future major releases of Red Hat Enterprise Linux.


Comment 15 RHEL Program Management 2008-03-25 11:25:38 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.