]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: error out on missing dhcp host attributes
authorJán Tomko <jtomko@redhat.com>
Thu, 26 Feb 2015 08:03:09 +0000 (09:03 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 26 Feb 2015 08:10:46 +0000 (09:10 +0100)
In virNetworkDHCPHostDefParseXML an error is reported
when partialOkay == true, and none of ip, mac, name
were supplied.

Add the missing goto and error out in this case.

(cherry picked from commit b15b21f3a52945644c7ccbbe1dd51b86d36ca777)

src/conf/network_conf.c

index 81e311e4460d982ccfcbd7d6f90aec4dcb422942..f3ec1758a27d393974817ac8b011aca4141c319b 100644 (file)
@@ -737,6 +737,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
                              "must be specified for static host definition "
                              "in network '%s' "),
                            networkName);
+            goto cleanup;
         }
     } else {
         /* normal usage - you need at least name (IPv6) or one of MAC