From d48dddab0509e562209adfb115b0e691b8e47f54 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 22 Jun 2021 20:54:30 +0200 Subject: 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. --- python/vyos/ethtool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/vyos/ethtool.py') 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): -- cgit v1.2.3