git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dc898c
)
xenserver: Cope gracefully with non-integer MTU in interface-reconfigure.
author
Ian Campbell
<Ian.Campbell@citrix.com>
Thu, 6 Aug 2009 20:39:24 +0000
(13:39 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 7 Aug 2009 00:07:18 +0000
(17:07 -0700)
CP-1148.
xenserver/opt_xensource_libexec_interface-reconfigure
patch
|
blob
|
history
diff --git
a/xenserver/opt_xensource_libexec_interface-reconfigure
b/xenserver/opt_xensource_libexec_interface-reconfigure
index
72d4386
..
5f19ff3
100755
(executable)
--- a/
xenserver/opt_xensource_libexec_interface-reconfigure
+++ b/
xenserver/opt_xensource_libexec_interface-reconfigure
@@
-758,12
+758,13
@@
def configure_netdev(pif):
else:
raise Error("Unknown IP-configuration-mode %s" % pifrec['ip_configuration_mode'])
- oc = {}
- if pifrec.has_key('other_config'):
- oc = pifrec['other_config']
- if oc.has_key('mtu'):
+ oc = pifrec['other_config']
+ if oc.has_key('mtu'):
+ try:
int(oc['mtu']) # Check that the value is an integer
ifconfig_argv += ['mtu', oc['mtu']]
+ except ValueError, x:
+ log("Invalid value for mtu = %s" % mtu)
run_command(ifconfig_argv)