Bug 134811 - ifup fails to set link up in dynamic ip config section before running link check, causing ETHTOOL_OPTS to fail
ifup fails to set link up in dynamic ip config section before running link ch...
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
Blocks: 129243
  Show dependency treegraph
Reported: 2004-10-06 10:25 EDT by Neil Horman
Modified: 2014-03-16 22:49 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-30 12:09:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to fix ifup script (715 bytes, patch)
2004-10-06 10:27 EDT, 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 08:35 EDT, Neil Horman
no flags Details | Diff

  None (edit)
Description Neil Horman 2004-10-06 10:25:18 EDT
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:

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 10:27:58 EDT
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 12:48:07 EDT
check_link_down already sets the link up.
Comment 3 Neil Horman 2004-10-13 08:34:21 EDT
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 08:35:16 EDT
Created attachment 105140 [details]
patch to correct as 2.1 ifup script so ETHTOOL_OPTS works properly
Comment 10 John Flanagan 2004-12-13 15:31:44 EST
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.


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