datapath: conntrack NAT helper compat code for Linux 4.5 and earlier.
authorJarno Rajahalme <jarno@ovn.org>
Tue, 21 Jun 2016 01:51:08 +0000 (18:51 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Tue, 21 Jun 2016 01:51:08 +0000 (18:51 -0700)
commit4cc85f28f13039efbc16ac84e85cc7d5d9723476
treebf9aef8e80c1c8bf077210ff1a806b16d8b9cb9b
parentf8f97cdce9ad3a8af32c05280a9e852372c7fba8
datapath: conntrack NAT helper compat code for Linux 4.5 and earlier.

Upstream commit:
    commit 264619055bd52bc2278af848472176642d759874
    Author: Jarno Rajahalme <jarno@ovn.org>
    Date:   Thu Mar 10 10:54:17 2016 -0800

    netfilter: Allow calling into nat helper without skb_dst.

    NAT checksum recalculation code assumes existence of skb_dst, which
    becomes a problem for a later patch in the series ("openvswitch:
    Interface with NAT.").  Simplify this by removing the check on
    skb_dst, as the checksum will be dealt with later in the stack.

Suggested-by: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This patch adds a corresponding backport for Linux 4.5 and older into
datapath/conntrack.c, changing a TCP or UDP packet to CHECKSUM_PARTIAL
to avoid triggering the skb_dst dependency that otherwise crashes the
kernel when checksums are recalculated after NAT helper has mangled
TCP or UDP packet contents.

Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/conntrack.c