提交 df1e2025 编写于 作者: F Felix Fietkau 提交者: Pablo Neira Ayuso

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: NFelix Fietkau <nbd@nbd.name>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 33894c36
...@@ -84,7 +84,7 @@ flow_offload_alloc(struct nf_conn *ct, struct nf_flow_route *route) ...@@ -84,7 +84,7 @@ flow_offload_alloc(struct nf_conn *ct, struct nf_flow_route *route)
if (ct->status & IPS_SRC_NAT) if (ct->status & IPS_SRC_NAT)
flow->flags |= FLOW_OFFLOAD_SNAT; flow->flags |= FLOW_OFFLOAD_SNAT;
else if (ct->status & IPS_DST_NAT) if (ct->status & IPS_DST_NAT)
flow->flags |= FLOW_OFFLOAD_DNAT; flow->flags |= FLOW_OFFLOAD_DNAT;
return flow; return flow;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册