summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
author_mrplow <mrplow87@users.noreply.github.com>2026-09-25 14:25:45 +0200
committerChristian Breunig <christian@breunig.cc>2026-09-29 21:30:47 +0200
commit41e64e80978bce094ef37f59771943e9e977ae87 (patch)
tree7b5a540b1afdbc5805ddd4f5e917bd610e225bd1 /python
parent541c7f90c5c45e7e51a9978ad0cbfb8e8ab942ca (diff)
downloadvyos-1x-41e64e80978bce094ef37f59771943e9e977ae87.tar.gz
vyos-1x-41e64e80978bce094ef37f59771943e9e977ae87.zip
ethtool: T9353: fix BASEX mode(s) support in check_speed_duplex()
Bugfix which allows for BaseX link modes reported by ethtool to be correctly validated, so config can be commited.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ethtool.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index 66dc6bb89..f476c6835 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -79,7 +79,7 @@ class Ethtool:
if driver:
self._driver_name = driver.group(1)
- # Build a dictionary of supported link-speed and dupley settings.
+ # Build a dictionary of supported link-speed and duplex settings.
# [ {
# "ifname": "eth0",
# "supported-ports": [ "TP" ],
@@ -216,9 +216,9 @@ class Ethtool:
if self.get_driver_name() in _drivers_without_speed_duplex_flow:
return False
- # ['10baset/half', '10baset/full', '100baset/half', '100baset/full', '1000baset/full']
+ # ['10baset/half', '10baset/full', '100baset/half', '100baset/full', '1000baset/full', '2500basex/full', '10000basekx4/full', '10000basesr/full']
tmp = [x.lower() for x in self._base_settings['supported-link-modes']]
- if f'{speed}baset/{duplex}' in tmp:
+ if any(f'{speed}base' in item and f'/{duplex}' in item for item in tmp):
return True
return False