]> xenbits.xensource.com Git - qemu-upstream-4.6-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 13:52:23 +0000 (13:52 +0000)
commit6d75b8f79bfaa352566147ea606ca4ea504992d2
tree6783cf138d8466911f33c3dcdd110d9c157b5ccf
parentb649863740fb3b93ba716d665fbfa1ce83cb5936
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