Bug 134811 - ifup fails to set link up in dynamic ip config section before running link check, causing ETHTOOL_OPTS to fail
Summary: ifup fails to set link up in dynamic ip config section before running link ch...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: initscripts
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 129243
TreeView+ depends on / blocked
 
Reported: 2004-10-06 14:25 UTC by Neil Horman
Modified: 2014-03-17 02:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-30 17:09:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to fix ifup script (715 bytes, patch)
2004-10-06 14:27 UTC, Neil Horman
no flags Details | Diff
patch to correct as 2.1 ifup script so ETHTOOL_OPTS works properly (299 bytes, patch)
2004-10-13 12:35 UTC, Neil Horman
no flags Details | Diff


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

Description Neil Horman 2004-10-06 14:25:18 UTC
Description of problem:
The ifup script fails to bring up an interface (using ip link <dev>
up) in the dynamic ip configuration clause before issuing the call to
check_link_down.  This failure causes ethtool to fail when checking
link status in check_link_down->check_ethtool.  Interestingly,
check_ethtool returns 2 if ethtool fails to report link, which causes
check_link_down to succede.  Since dhclient/dhcpcd/pump all
automatically bring up an ethernet interface before sending a DHCP
frame, this problem has been largely masked.  However, if someone sets
the ETHTOOL_OPTS variable for an interface which is configured for
dhcp, then those ETHTOOL_OPTS will not be set on the interface, since
the interface is not yet up.  This leads to problems in which
interfaces are connected to network peers which requre certain
ethernet options be set (speed/duplex, etc).  The final result is that
any network card configured for dhcp will not be able to obtain an
address if its link partner requires specific speed and duplex
settings to communicate.

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


How reproducible:
always

Steps to Reproduce:
1.Connect a NIC to a strict 10MB hub. Ensure the NIC has no module
options that force speed to 10MB, and that autonegotiation is enabled
by default
2.Configure the NIC for dhcp in ifcfg-<ifc>
3.Configure ETHTOOL_OPTS to force the NIC speed to 10MB
4.Attempt to ifup the NIC
  
Actual results:
the NIC will be unable to obtain an IP address

Expected results:
The NIC should obtain an IP address

Additional info:

Comment 1 Neil Horman 2004-10-06 14:27:58 UTC
Created attachment 104837 [details]
patch to fix ifup script

This patch adds a unconditional call to ip link <dev> up in the dynamic ip
config clause of ifup.	This same check is already present in the static ip
config clause.	There is also a requisite call to ip link <dev> down, should
check_link_down legitimately fail.

Comment 2 Bill Nottingham 2004-10-06 16:48:07 UTC
check_link_down already sets the link up.

Comment 3 Neil Horman 2004-10-13 12:34:21 UTC
sorry, I should have opened this against AS2.1, rather than RHEL3. 
the AS2.1 ifup script makes no call to check_link_down at all, opting
instead to raise the link manually with ip link set ${REALDEVICE} up
in both the dynamic and static ip config clauses.  The ip link set up
command is in place in the static section, but not the dynamic section.

Comment 4 Neil Horman 2004-10-13 12:35:16 UTC
Created attachment 105140 [details]
patch to correct as 2.1 ifup script so ETHTOOL_OPTS works properly

Comment 10 John Flanagan 2004-12-13 20:31:44 UTC
An errata 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-619.html



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