Commit 8a47550b authored by Mark Schouten's avatar Mark Schouten

Fix setting mtu and work around a current bug in Ifalias

parent 8a8de158
......@@ -262,7 +262,7 @@ def Ifmtu(iface, mtu):
print("Setting MTU of interface %s to %s" % (iface, mtu))
global ip
i = ip.interfaces[iface]
i['mtu'] = int(mtu)
i.mtu = int(mtu)
ip.commit()
def Ifalias(iface, alias):
......@@ -270,4 +270,8 @@ def Ifalias(iface, alias):
global ip
i = ip.interfaces[iface]
i['ifalias'] = alias
ip.commit()
# XXX We do not want this. But untill https://github.com/svinota/pyroute2/issues/349 is fixed, we need it.
try:
ip.commit()
except:
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment