aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2015-10-07 11:52:13 +0800
committerJason Wang <jasowang@redhat.com>2015-10-12 13:19:36 +0800
commit9abce56d7b319b0c78b487720d128706272e0a0c (patch)
treed4fa4db4846829c1cf64e094e4d9a042c8034616
parentd62241eb6da9bd2517f07b3219ba4208b90b4e0d (diff)
vl.c: init delayed object after net_init_clients
Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
-rw-r--r--vl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/vl.c b/vl.c
index f2bd8d20fb..17ae26c641 100644
--- a/vl.c
+++ b/vl.c
@@ -2767,13 +2767,14 @@ static bool object_create_initial(const char *type)
if (g_str_equal(type, "rng-egd")) {
return false;
}
+ /* TODO: implement netfilters */
return true;
}
/*
* The remainder of object creation happens after the
- * creation of chardev, fsdev and device data types.
+ * creation of chardev, fsdev, net clients and device data types.
*/
static bool object_create_delayed(const char *type)
{
@@ -4286,12 +4287,6 @@ int main(int argc, char **argv, char **envp)
exit(0);
}
- if (qemu_opts_foreach(qemu_find_opts("object"),
- object_create,
- object_create_delayed, NULL)) {
- exit(1);
- }
-
machine_opts = qemu_get_machine_opts();
if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
NULL)) {
@@ -4397,6 +4392,12 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+ if (qemu_opts_foreach(qemu_find_opts("object"),
+ object_create,
+ object_create_delayed, NULL)) {
+ exit(1);
+ }
+
#ifdef CONFIG_TPM
if (tpm_init() < 0) {
exit(1);