aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net.c b/net.c
index ec4745df31..72ac4cf5df 100644
--- a/net.c
+++ b/net.c
@@ -411,11 +411,11 @@ int qemu_can_send_packet(VLANClientState *sender)
}
/* no can_receive() handler, they can always receive */
- if (!vc->info->can_receive || vc->info->can_receive(vc)) {
- return 1;
+ if (vc->info->can_receive && !vc->info->can_receive(vc)) {
+ return 0;
}
}
- return 0;
+ return 1;
}
static ssize_t qemu_deliver_packet(VLANClientState *sender,