summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-02-25 18:18:52 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-02-25 20:10:19 +0100
commitf4b7ac5ec37d0b6b183677d8b3f10576b18945fd (patch)
tree26642db17637b212bcc05ca8774394309e905282 /net
parentnetfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets (diff)
downloadlinux-f4b7ac5ec37d0b6b183677d8b3f10576b18945fd.tar.xz
linux-f4b7ac5ec37d0b6b183677d8b3f10576b18945fd.zip
netfilter: nf_flow_table: fix checksum when handling DNAT
Add a missing call to csum_replace4 like on SNAT. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/nf_flow_table_ipv4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nf_flow_table_ipv4.c b/net/ipv4/netfilter/nf_flow_table_ipv4.c
index 25d2975da156..282b9cc4fe82 100644
--- a/net/ipv4/netfilter/nf_flow_table_ipv4.c
+++ b/net/ipv4/netfilter/nf_flow_table_ipv4.c
@@ -111,6 +111,7 @@ static int nf_flow_dnat_ip(const struct flow_offload *flow, struct sk_buff *skb,
default:
return -1;
}
+ csum_replace4(&iph->check, addr, new_addr);
return nf_flow_nat_ip_l4proto(skb, iph, thoff, addr, new_addr);
}