Pointer setup fixes for transport mode stacked on iptunnel

The existing code in esp4_gso_segment has a bug that clobbers
the inner ip src/dst and causing checksum drops for the case of
transport mode stacked on ip tunnel.

In this case, after ->gso_segment, we have an sk_buff whree
  data/mac_header points at the start of
        Ethernet + outer ip header + esp header (so mac-len is 42)
  network_header points at inner ip header
  transport_header points at tcphdr.
So the existing code would go and move transport_header back by
8 bytes, and clobber the ipsrc/ipdst in the inner IP header with SPI/seq#.

This is the patch that fixes that bug.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
1 file changed