diff options
author | up-n-atom <adam.jaremko@gmail.com> | 2024-02-26 14:16:40 -0500 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-29 10:50:46 +0000 |
commit | e6af88c79cfb178765ede8910b690cc349d8e5f6 (patch) | |
tree | 9315187d0150e164b629fa4ba26ae96e7784b767 | |
parent | beb120958f0a6556db30a2aaf8dcd997506b2035 (diff) | |
download | vyos-1x-e6af88c79cfb178765ede8910b690cc349d8e5f6.tar.gz vyos-1x-e6af88c79cfb178765ede8910b690cc349d8e5f6.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.
(cherry picked from commit 775348a4cda34e6be16454d43c77b525e57c4e47)
-rw-r--r-- | python/vyos/ethtool.py | 2 |
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 """ |