diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-15 14:46:44 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-20 21:28:53 +0200 |
commit | 9fe2bcb3666bc115e0d5f907b0097a874efa43ff (patch) | |
tree | b7a7a43c908e60d457a6156268c9277177170b95 /python/vyos | |
parent | f5784bd48a6600372696b6731d4300735e710dd3 (diff) | |
download | vyos-1x-9fe2bcb3666bc115e0d5f907b0097a874efa43ff.tar.gz vyos-1x-9fe2bcb3666bc115e0d5f907b0097a874efa43ff.zip |
Python/ifconfig: T1557: vmxnet3/virtio_net do not support changing speed/duplex control
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/ifconfig.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index 17cc7a2a7..e1c1e0246 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -1141,6 +1141,12 @@ class EthernetIf(VLANIf): if duplex not in ['auto', 'full', 'half']: raise ValueError("Value out of range (duplex)") + if self.get_driver_name() in ['vmxnet3', 'virtio_net']: + self._debug_msg('{} driver does not support changing speed/duplex settings!' + .format(self.get_driver_name())) + return + + cmd = '/sbin/ethtool -s {}'.format(self._ifname) if speed == 'auto' or duplex == 'auto': cmd += ' autoneg on' |