mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
NetRxPkt: Do not try to pull more data than present
In case of VLAN stripping, ETH header put into a separate buffer, therefore amont of data copied from original IOV should be smaller. Cc: qemu-stable@nongnu.org Signed-off-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
committed by
Jason Wang
parent
df8bf7a7fe
commit
d5e772146d
+2
-1
@@ -96,7 +96,8 @@ 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);
|
||||
iov, iovcnt, ploff,
|
||||
pkt->tot_len - pkt->ehdr_buf_len);
|
||||
} else {
|
||||
net_rx_pkt_iovec_realloc(pkt, iovcnt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user