diff --git a/ifupdownaddons/iproute2.py b/ifupdownaddons/iproute2.py index cf15046..04c6900 100644 --- a/ifupdownaddons/iproute2.py +++ b/ifupdownaddons/iproute2.py @@ -419,8 +419,9 @@ class iproute2(utilsBase): self._cache_update([ifacename, 'hwaddress'], hwaddress) def link_set_mtu(self, ifacename, mtu): + if ifupdownflags.flags.DRYRUN: + return True if not mtu or not ifacename: return - with open('/sys/class/net/%s/mtu' % ifacename, 'w') as f: f.write(mtu) self._cache_update([ifacename, 'mtu'], mtu)