1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

addons: ethtool: skip speed zero from query running

kernel might return running speed 0 if port does
not have carrier

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-08-08 23:15:20 -07:00
committed by Nikhil
parent 6fa93b22fe
commit c14de85ca4

View File

@@ -243,6 +243,10 @@ class ethtool(moduleBase,utilsBase):
# to see the defaults, we should implement another flag (--with-defaults)
if default_val == running_attr:
continue
# do not proceed if speed = 0
if attr == 'speed' and running_attr and running_attr == '0':
return
if running_attr:
ifaceobj.update_config('link-%s'%attr, running_attr)