diff --git a/net/hub.c b/net/hub.c index 78b671ed9583cfba182e96fcf70ed3b5fe9b0b9d..5795a678edb43a3c527b9032c3d1cdea085dcff7 100644 --- a/net/hub.c +++ b/net/hub.c @@ -20,6 +20,7 @@ #include "hub.h" #include "qemu/iov.h" #include "qemu/error-report.h" +#include "sysemu/qtest.h" /* * A hub broadcasts incoming packets to all its ports except the source port. @@ -346,7 +347,7 @@ void net_hub_check_clients(void) if (has_host_dev && !has_nic) { warn_report("hub %d with no nics", hub->id); } - if (has_nic && !has_host_dev) { + if (has_nic && !has_host_dev && !qtest_enabled()) { warn_report("hub %d is not connected to host network", hub->id); } }