From: Felix Fietkau Date: Fri, 23 Mar 2018 18:15:38 +0000 (+0100) Subject: netfilter: nf_flow_table: fix offloading connections with SNAT+DNAT X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=df1e202531235f82a98e5b6c377a93a1e7d45673;p=openwrt%2Fstaging%2Fblogic.git netfilter: nf_flow_table: fix offloading connections with SNAT+DNAT Pass all NAT types to the flow offload struct, otherwise parts of the address/port pair do not get translated properly, causing connection stalls Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c index 0699981a8511..eb0d1658ac05 100644 --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c @@ -84,7 +84,7 @@ flow_offload_alloc(struct nf_conn *ct, struct nf_flow_route *route) if (ct->status & IPS_SRC_NAT) flow->flags |= FLOW_OFFLOAD_SNAT; - else if (ct->status & IPS_DST_NAT) + if (ct->status & IPS_DST_NAT) flow->flags |= FLOW_OFFLOAD_DNAT; return flow;