rh_ip module: only set the mtu once

Fixes #29137.
This commit is contained in:
Justin Findlay 2015-11-25 10:11:05 -07:00
parent 0c0e15d4e9
commit 0a8952f6ac

View file

@ -561,7 +561,7 @@ def _parse_settings_eth(opts, iface_type, enabled, iface):
if 'mtu' in opts:
try:
result['mtu'] = int(opts['mtu'])
except Exception:
except ValueError:
_raise_error_iface(iface, 'mtu', ['integer'])
if iface_type not in ['bridge']:
@ -632,13 +632,6 @@ def _parse_settings_eth(opts, iface_type, enabled, iface):
if opt in opts:
result[opt] = opts[opt]
if 'mtu' in opts:
try:
int(opts['mtu'])
result['mtu'] = opts['mtu']
except Exception:
_raise_error_iface(iface, 'mtu', ['integer'])
if 'ipv6_autoconf' in opts:
result['ipv6_autoconf'] = opts['ipv6_autoconf']