]> xenbits.xensource.com Git - 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:03:09 +0000 (09:03 +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.

src/conf/network_conf.c

index 52fcf3d2aa88cfd47895f87b38a578df7fcda339..0f4fc1edbc1c9d42b84a7ae93f97e9d1f13470c9 100644 (file)
@@ -746,6 +746,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