diff options
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index a496e66b..caba8b6f 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -580,8 +580,10 @@ sub set_speed_duplex { if ($autoneg) { return if ($nspeed eq 'auto'); } else { - return if (defined $ospeed && defined $oduplex && - $nspeed eq $ospeed && $nduplex eq $oduplex); + die "Device $intf does not support setting speed/duplex\n" + unless (defined($ospeed) && defined($oduplex)); + + return if (($nspeed eq $ospeed) && ($nduplex eq $oduplex)); } my @cmd = ('sudo', 'ethtool', '-s', $intf ); |