From e2abe690babf06fc49bdec49b08cb45dd3e09138 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Wed, 13 Mar 2013 17:42:17 +0000 Subject: xl/libxl: add gatewaydev/netdev to vif specification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This option is used by the vif-route hotplug script. A new more descriptive name is used, "gatewaydev", but "netdev" is also supported as a deprecated backwards compatible option. This option was supported in the past, according to http://wiki.xen.org/wiki/Vif-route, so we should also support it in libxl. Signed-off-by: Roger Pau Monné Acked-by: Ian Campbell Tested-by: Ulf Kreutzberg Cc: Ulf Kreutzberg Cc: Ian Campbell Cc: George Dunlap Acked-by: Ian Jackson --- tools/libxl/libxl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/libxl/libxl.c') diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a09c0fad68..572c2c6442 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2829,7 +2829,7 @@ void libxl__device_nic_add(libxl__egc *egc, uint32_t domid, if (rc) goto out; front = flexarray_make(gc, 16, 1); - back = flexarray_make(gc, 16, 1); + back = flexarray_make(gc, 18, 1); if (nic->devid == -1) { if ((nic->devid = libxl__device_nextid(gc, domid, "vif") < 0)) { @@ -2865,6 +2865,10 @@ void libxl__device_nic_add(libxl__egc *egc, uint32_t domid, flexarray_append(back, "ip"); flexarray_append(back, libxl__strdup(gc, nic->ip)); } + if (nic->gatewaydev) { + flexarray_append(back, "gatewaydev"); + flexarray_append(back, libxl__strdup(gc, nic->gatewaydev)); + } if (nic->rate_interval_usecs > 0) { flexarray_append(back, "rate"); -- cgit v1.2.3