diff options
author | Dmitry Fleytman <dmitry@daynix.com> | 2017-02-16 14:29:35 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2017-03-06 11:46:02 +0800 |
commit | c5d083c561a4f5297cc2e44a2f3cef3324d77a88 (patch) | |
tree | b9c00163f5017fd1cc4e930a0f96dfda81421c59 /hw/net | |
parent | d5e772146d2bbc92e5126c145eddef3b2843d026 (diff) | |
download | qemu-c5d083c561a4f5297cc2e44a2f3cef3324d77a88.zip |
NetRxPkt: Account buffer with ETH header in IOV length
In case of VLAN stripping ETH header is stored in a
separate chunk and length of IOV should take this into
account.
This patch fixes checksum validation for RX packets
with VLAN header.
Devices affected by this problem: e1000e and vmxnet3.
Cc: qemu-stable@nongnu.org
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/net_rx_pkt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c index 0003a0e88b..2649d40b5c 100644 --- a/hw/net/net_rx_pkt.c +++ b/hw/net/net_rx_pkt.c @@ -97,7 +97,7 @@ net_rx_pkt_pull_data(struct NetRxPkt *pkt, pkt->tot_len = iov_size(iov, iovcnt) - ploff + pkt->ehdr_buf_len; pkt->vec_len = iov_copy(pkt->vec + 1, pkt->vec_len_total - 1, iov, iovcnt, ploff, - pkt->tot_len - pkt->ehdr_buf_len); + pkt->tot_len - pkt->ehdr_buf_len) + 1; } else { net_rx_pkt_iovec_realloc(pkt, iovcnt); |