summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-31 18:15:47 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-31 18:55:44 +0200
commitcc742d48579e4f76e5d3230d87e22f71f76f9301 (patch)
tree97ae925890fa13b3a2b87b88d17793719c40f375 /src/conf_mode
parenta086dc2c429aea9614ac7a9c735c6475c2d6da59 (diff)
downloadvyos-1x-cc742d48579e4f76e5d3230d87e22f71f76f9301.tar.gz
vyos-1x-cc742d48579e4f76e5d3230d87e22f71f76f9301.zip
ethernet: T2241: check if interface supports changing speed/duplex settings
Not all interface drivers have the ability to change the speed and duplex settings. Known drivers with this limitation are vmxnet3, virtio_net and xen_netfront. If this driver is detected, an error will be presented to the user.
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-ethernet.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py
index 27c4a7c38..889f4856f 100755
--- a/src/conf_mode/interfaces-ethernet.py
+++ b/src/conf_mode/interfaces-ethernet.py
@@ -85,7 +85,8 @@ def verify(ethernet):
speed = ethernet['speed']
duplex = ethernet['duplex']
if not ethtool.check_speed_duplex(speed, duplex):
- raise ConfigError(f'Adapter does not support speed "{speed}" and duplex "{duplex}"!')
+ raise ConfigError(f'Adapter does not support changing speed and duplex '\
+ f'settings to: {speed}/{duplex}!')
if 'ring_buffer' in ethernet:
max_rx = ethtool.get_rx_buffer()