diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-10 16:45:30 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-10 17:01:21 +0200 |
commit | cc313b32ef26141c2c027e8543f78da1231cada2 (patch) | |
tree | 10a9f39dde08d5b3167dae183b00ba3c171af073 /python/vyos/ifconfig/ethernet.py | |
parent | 310eb1b527047211ae236c6415fee51f15a0fa57 (diff) | |
download | vyos-1x-cc313b32ef26141c2c027e8543f78da1231cada2.tar.gz vyos-1x-cc313b32ef26141c2c027e8543f78da1231cada2.zip |
ethernet: T3802: check if driver supports changing flow-control settings
(cherry picked from commit 1572edd2cef355710d1129907d3e49451a6c31d4)
Diffstat (limited to 'python/vyos/ifconfig/ethernet.py')
-rw-r--r-- | python/vyos/ifconfig/ethernet.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py index 7bd269491..c4dfc7198 100644 --- a/python/vyos/ifconfig/ethernet.py +++ b/python/vyos/ifconfig/ethernet.py @@ -115,11 +115,10 @@ class EthernetIf(Interface): if enable not in ['on', 'off']: raise ValueError("Value out of range") - driver_name = self.get_driver_name() - if driver_name in ['vmxnet3', 'virtio_net', 'xen_netfront']: + if not self.ethtool.check_flow_control(): self._debug_msg(f'{driver_name} driver does not support changing '\ 'flow control settings!') - return + return False current = self.ethtool.get_flow_control() if current != enable: |