]> git.proxmox.com Git - qemu.git/commitdiff
net: net_check_clients() checks only VLAN clients, fix
authorMarkus Armbruster <armbru@redhat.com>
Thu, 11 Feb 2010 13:45:00 +0000 (14:45 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 19 Feb 2010 18:12:47 +0000 (12:12 -0600)
Clients not associated with a VLAN exist since commit d80b9fc6.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net.c

diff --git a/net.c b/net.c
index 509f074c3d079f927b7b48b4c8e597cfbd66fc45..fb425e397ffe85b962eacf6c6c76cc35f9351883 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1300,6 +1300,13 @@ void net_check_clients(void)
                     "Warning: vlan %d is not connected to host network\n",
                     vlan->id);
     }
+    QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
+        if (!vc->peer) {
+            fprintf(stderr, "Warning: %s %s has no peer\n",
+                    vc->info->type == NET_CLIENT_TYPE_NIC ? "nic" : "netdev",
+                    vc->name);
+        }
+    }
 }
 
 static int net_init_client(QemuOpts *opts, void *dummy)