]> xenbits.xensource.com Git - qemu-upstream-4.3-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:18:06 +0000 (14:18 +0000)
commit987b154d1458f714a92b40f36e07a73b14e78537
treea8ec259ead25b06ed4411fb4a3283c9aece7d74a
parent5b648eae0ca66d58303cdabfc0c14cbc3063e769
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>
hw/rtl8139.c