mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: ethtool: fec: only use and compare lowercase data
on --show-fec ethtool seems to return fec in uppercase while we only advertise lowercase validvals. We should only deal and compare lowercase values for running, config and default root@host:/home/cumulus# /sbin/ethtool --show-fec swp29 FEC parameters for swp29: FEC encodings : RS root@host:/home/cumulus# testing: set: link-fec rs ifup/ifreloads Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -86,8 +86,17 @@ class ethtool(moduleBase,utilsBase):
|
||||
# if we have no default and the user did not have settings
|
||||
return
|
||||
|
||||
# check running values
|
||||
# use only lowercase values
|
||||
running_val = self.get_running_attr('fec', ifaceobj)
|
||||
|
||||
if running_val:
|
||||
running_val = running_val.lower()
|
||||
if config_val:
|
||||
config_val = config_val.lower()
|
||||
if default_val:
|
||||
default_val = default_val.lower()
|
||||
|
||||
# check running values
|
||||
if config_val and config_val == running_val:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user