summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/virtio/device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c
index 5528ddb0429..ae8a116efee 100644
--- a/src/vnet/devices/virtio/device.c
+++ b/src/vnet/devices/virtio/device.c
@@ -130,6 +130,9 @@ add_buffer_to_slot (vlib_main_t * vm, virtio_vring_t * vring, u32 bi,
struct vring_desc *d;
d = &vring->desc[next];
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
+ struct virtio_net_hdr_v1 *hdr = vlib_buffer_get_current (b) - hdr_sz;
+
+ memset (hdr, 0, hdr_sz);
if (PREDICT_TRUE ((b->flags & VLIB_BUFFER_NEXT_PRESENT) == 0))
{