提交 c969aa7d 编写于 作者: P Pablo Neira Ayuso 提交者: David S. Miller

netfilter: ctnetlink: allow changing NAT sequence adjustment in creation

This patch fixes an inconsistency in the current ctnetlink code
since NAT sequence adjustment bit can only be updated but not set
in the conntrack entry creation.

This patch is used by conntrackd to successfully recover newly
created entries that represent connections with helpers and NAT
payload mangling.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3f900713
...@@ -1215,6 +1215,16 @@ ctnetlink_create_conntrack(struct nlattr *cda[], ...@@ -1215,6 +1215,16 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
} }
} }
#ifdef CONFIG_NF_NAT_NEEDED
if (cda[CTA_NAT_SEQ_ADJ_ORIG] || cda[CTA_NAT_SEQ_ADJ_REPLY]) {
err = ctnetlink_change_nat_seq_adj(ct, cda);
if (err < 0) {
rcu_read_unlock();
goto err;
}
}
#endif
if (cda[CTA_PROTOINFO]) { if (cda[CTA_PROTOINFO]) {
err = ctnetlink_change_protoinfo(ct, cda); err = ctnetlink_change_protoinfo(ct, cda);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册