]> xenbits.xensource.com Git - qemu-upstream-4.2-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:22:46 +0000 (14:22 +0000)
commite2c8930853198fc4c9e50e46653bc1e577f785c8
treecd1adf17be397c8b2779f613f5242d3809a51f23
parenta1c76be898c9da3a4a6c71d21e5ca6b8591fc9f9
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