summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-24 18:04:17 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-24 18:10:48 +0200
commitd77f68ef3198cff019e1e2d74dfe2290800a1ea6 (patch)
treeda3be3377968d9f4c242c0dfb5aa2421ecf7fbc8 /src/conf_mode/interface-ethernet.py
parent6b828200e698dbff5a3ee61a0c6c9906b0a8493f (diff)
downloadvyos-1x-d77f68ef3198cff019e1e2d74dfe2290800a1ea6.tar.gz
vyos-1x-d77f68ef3198cff019e1e2d74dfe2290800a1ea6.zip
Python/ifconfig: T1557: refactor 'mtu' property to get_mtu()/set_mtu()
Diffstat (limited to 'src/conf_mode/interface-ethernet.py')
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index 5d597fd0a..43e598618 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -71,7 +71,7 @@ def apply_vlan_config(vlan, config):
# ignore link state changes
vlan.link_detect = config['disable_link_detect']
# Maximum Transmission Unit (MTU)
- vlan.mtu = config['mtu']
+ vlan.set_mtu(config['mtu'])
# Change VLAN interface MAC address
if config['mac']:
vlan.mac = config['mac']
@@ -296,7 +296,7 @@ def apply(eth):
e.mac = eth['hw_id']
# Maximum Transmission Unit (MTU)
- e.mtu = eth['mtu']
+ e.set_mtu(eth['mtu'])
# GRO (generic receive offload)
e.set_gro(eth['offload_gro'])