net/colo.c: Fix the pointer issue reported by Coverity.

When enabled the virtio-net-pci, guest network packet will
load the vnet_hdr. In COLO status, the primary VM's network
packet maybe redirect to another VM, it needs filter-redirect
enable the vnet_hdr flag at the same time, COLO-proxy will
correctly parse the original network packet. If have any
misconfiguration here, the vnet_hdr_len is wrong for parse
the packet, the data+offset will point to wrong place.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
Zhang Chen 2022-08-22 16:14:36 +08:00 committed by Jason Wang
parent 0e3fdcffea
commit 3772cf0d1b
3 changed files with 18 additions and 10 deletions

View file

@ -18,6 +18,7 @@
#include "qemu/jhash.h"
#include "qemu/timer.h"
#include "net/eth.h"
#include "standard-headers/linux/virtio_net.h"
#define HASHTABLE_MAX_SIZE 16384