diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-06-22 20:54:30 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-06-22 21:01:26 +0200 |
commit | 705eddbc7a2caf09c37ecafb27418a764217975a (patch) | |
tree | 4eef7da2ac0eb396f3700e89d9efbd2cbb14e517 /python/vyos | |
parent | 308069860351a888b5603bf3808bdc89b5e0de1b (diff) | |
download | vyos-1x-705eddbc7a2caf09c37ecafb27418a764217975a.tar.gz vyos-1x-705eddbc7a2caf09c37ecafb27418a764217975a.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.
(cherry picked from commit d48dddab0509e562209adfb115b0e691b8e47f54)
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/ethtool.py | 6 |
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): |