]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commit
rtl8139: skip offload on short TCP header
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 15 Jul 2015 17:17:03 +0000 (18:17 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 3 Aug 2015 14:04:41 +0000 (14:04 +0000)
commita16fe83c866b75654dce93138eb96a319a1a864a
tree3a8cfb5fd309d8f6b1cf255dd4e2c344d4798652
parent6f4bd30fe9587f15cda1e812fa78a8f2c6163057
rtl8139: skip offload on short TCP header

TCP Large Segment Offload accesses the TCP header in the packet.  If the
packet is too short we must not attempt to access header fields:

  tcp_header *p_tcp_hdr = (tcp_header*)(eth_payload_data + hlen);
  int tcp_hlen = TCP_HEADER_DATA_OFFSET(p_tcp_hdr);

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/net/rtl8139.c