virtio: fix the buffer array index
Type: fix
Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519
Change-Id: I24a9822d1968a134c7e41221f48296cc8a67dd91
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c
index b84949c..fe943a9 100644
--- a/src/vnet/devices/virtio/device.c
+++ b/src/vnet/devices/virtio/device.c
@@ -723,7 +723,7 @@
}
if (n_left)
virtio_interface_drop_inline (vm, node->node_index,
- buffers, n_left,
+ buffers + frame->n_vectors - n_left, n_left,
VIRTIO_TX_ERROR_NO_FREE_SLOTS);
clib_spinlock_unlock_if_init (&vring->lockp);