summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-22 20:54:30 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-22 20:57:53 +0200
commitd48dddab0509e562209adfb115b0e691b8e47f54 (patch)
tree92f39264626365c23f75c3d9f1bdc5fa6e7e4716 /python
parented6b185c40f21f59da11f16771c46457c40399b9 (diff)
downloadvyos-1x-d48dddab0509e562209adfb115b0e691b8e47f54.tar.gz
vyos-1x-d48dddab0509e562209adfb115b0e691b8e47f54.zip
vyos.ethtool: T3645: fix compatibility with latest ethtool version
Ethtool version used on Debian Bullseye changed the output format from 0 -> n/a. As we are only interested in the tx/rx keys we do not care about RX Mini/Jumbo.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ethtool.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index 136feae8d..bc103959a 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -57,7 +57,11 @@ class Ethtool:
if ':' in line:
key, value = [s.strip() for s in line.strip().split(":", 1)]
key = key.lower().replace(' ', '_')
- self.ring_buffers[key] = int(value)
+ # T3645: ethtool version used on Debian Bullseye changed the
+ # output format from 0 -> n/a. As we are only interested in the
+ # tx/rx keys we do not care about RX Mini/Jumbo.
+ if value.isdigit():
+ self.ring_buffers[key] = int(value)
def is_fixed_lro(self):