From 775348a4cda34e6be16454d43c77b525e57c4e47 Mon Sep 17 00:00:00 2001 From: up-n-atom Date: Mon, 26 Feb 2024 14:16:40 -0500 Subject: 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. --- python/vyos/ethtool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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 """ -- cgit v1.2.3