[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] CA-39188: Change illegal MTU value to 1500 when creating Network


  • To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Rob Hoes <rob.hoes@xxxxxxxxxx>
  • Date: Thu, 25 Mar 2010 10:58:07 +0000
  • Delivery-date: Thu, 25 Mar 2010 03:58:17 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

# HG changeset patch
# User Rob Hoes <rob.hoes@xxxxxxxxxx>
CA-39188: Change illegal MTU value to 1500 when creating Network

There is already a default of 1500 in the datamodel for the Network.MTU field. 
However, language bindings tend to fill in their own default of 0 (which is 
illegal), when the field is not specified by the user.

Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

diff -r a8c9fb523f7e ocaml/xapi/xapi_network.ml
--- a/ocaml/xapi/xapi_network.ml        Thu Mar 25 09:49:35 2010 +0000
+++ b/ocaml/xapi/xapi_network.ml        Thu Mar 25 10:23:14 2010 +0000
@@ -124,6 +124,7 @@
        Mutex.execute mutex (fun () ->
                let networks = Db.Network.get_all ~__context in
                let bridges = List.map (fun self -> Db.Network.get_bridge 
~__context ~self) networks in
+               let mTU = if mTU <= 0L then 1500L else mTU in
                let rec loop () = 
                        let name = stem ^ (string_of_int !counter) in
                        incr counter;

Attachment: mtu-default
Description: Text document

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.