Skip to content

Commit

Permalink
netfilter: nf_flow_table: fix offloading connections with SNAT+DNAT
Browse files Browse the repository at this point in the history
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 <nbd@nbd.name>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Felix Fietkau authored and Pablo Neira Ayuso committed Apr 24, 2018
1 parent 33894c3 commit df1e202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_flow_table_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df1e202

Please sign in to comment.