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:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user