]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/network_driver.c: forbid set Autostart on transcient networks
authorDaniel Veillard <veillard@redhat.com>
Wed, 3 Jun 2009 13:52:06 +0000 (13:52 +0000)
committerDaniel Veillard <veillard@redhat.com>
Wed, 3 Jun 2009 13:52:06 +0000 (13:52 +0000)
daniel

ChangeLog
src/network_driver.c

index 2395590af441f474c01a4fd826c0a5d2834d681b..8bba459a948a709114d5e63e83515df32953e053 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jun  3 15:44:55 CEST 2009 Daniel Veillard <veillard@redhat.com>
+
+       * src/network_driver.c: forbid set Autostart on transcient networks
+
 Wed Jun  3 14:30:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
 
        * src/vbox/vbox_tmpl.c: Switch to positional struct initializers
index 10d5fd3d656ef5ac2664ca9405859969a03872d3..0c1623cbc551148d6d90ebe97226da17a3073210 100644 (file)
@@ -1353,6 +1353,12 @@ static int networkSetAutostart(virNetworkPtr net,
         goto cleanup;
     }
 
+    if (!network->persistent) {
+        networkReportError(net->conn, NULL, net, VIR_ERR_INTERNAL_ERROR,
+                         "%s", _("cannot set autostart for transient network"));
+        goto cleanup;
+    }
+
     autostart = (autostart != 0);
 
     if (network->autostart != autostart) {