]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vhost-user-bridge: Only process received packets on started queues
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 2 Oct 2017 19:15:19 +0000 (20:15 +0100)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 12 Oct 2017 14:57:42 +0000 (16:57 +0200)
Only process received packets if the queue has been started.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20171002191521.15748-3-dgilbert@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
tests/vhost-user-bridge.c

index f922cc75aed4b0d55747605503ee436d06ec4e46..d820033a72b622e56feb75788224ce8b2389a628 100644 (file)
@@ -277,6 +277,7 @@ vubr_backend_recv_cb(int sock, void *ctx)
     DPRINT("    hdrlen = %d\n", hdrlen);
 
     if (!vu_queue_enabled(dev, vq) ||
+        !vu_queue_started(dev, vq) ||
         !vu_queue_avail_bytes(dev, vq, hdrlen, 0)) {
         DPRINT("Got UDP packet, but no available descriptors on RX virtq.\n");
         return;