diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2013-01-03 09:57:54 -0800 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2013-01-03 09:57:54 -0800 |
commit | 4636eac34a2e74ef43cbacd0e9b5b533a113c694 (patch) | |
tree | 6f6253fe61b93de990215477149cf27ddffa091d /scripts | |
parent | 368e1d442039aafa65ac0bbb261750f641c77e59 (diff) | |
download | vyatta-cfg-system-4636eac34a2e74ef43cbacd0e9b5b533a113c694.tar.gz vyatta-cfg-system-4636eac34a2e74ef43cbacd0e9b5b533a113c694.zip |
Ignore speed setting if auto and no speed available
Bug 8538
If ethtool reports no speed setting, and configuration is auto
then everything is okay, and no change is necessary.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index c455bb74..0ead1b17 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -471,6 +471,10 @@ sub set_speed_duplex { # read old values to avoid meaningless speed changes my ($autoneg, $ospeed, $oduplex) = get_ethtool($intf); + # some devices do not report settings + # assume these are 'auto' + return if ((! defined($ospeed)) && $nspeed eq 'auto'); + if (defined($autoneg) && $autoneg == 1) { # Device is already in autonegotiation mode return if ($nspeed eq 'auto'); |