summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorup-n-atom <adam.jaremko@gmail.com>2024-02-26 14:16:40 -0500
committerGitHub <noreply@github.com>2024-02-26 14:16:40 -0500
commit775348a4cda34e6be16454d43c77b525e57c4e47 (patch)
treeeb443e314522ae4bd14dcff6e60721ca9be5e991
parent8b87836b371fdddb595ad3faf8a91a64f07c2bfb (diff)
downloadvyos-1x-775348a4cda34e6be16454d43c77b525e57c4e47.tar.gz
vyos-1x-775348a4cda34e6be16454d43c77b525e57c4e47.zip
vyos.ethtool: T6070: fix EEE reading the incorrect status line
EEE enabled status is on the 2nd line of ethtool output and not the 3rd. Subsequently, reading the 3rd line was causing an out-of-bounds access for the bnx2x driver as well.
-rw-r--r--python/vyos/ethtool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index ba638b280..f20fa452e 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -150,7 +150,7 @@ class Ethtool:
self._eee = True
# read current EEE setting, this returns:
# EEE status: disabled || EEE status: enabled - inactive || EEE status: enabled - active
- self._eee_enabled = bool('enabled' in out.splitlines()[2])
+ self._eee_enabled = bool('enabled' in out.splitlines()[1])
def check_auto_negotiation_supported(self):
""" Check if the NIC supports changing auto-negotiation """