netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] netfilter: ctnetlink: allow changing NAT sequence adjustment in creation
@ 2009-01-27 21:14 Pablo Neira Ayuso
  2009-01-27 21:15 ` [PATCH 2/2] netfilter: ctnetlink: fix echo if not subscribed to any multicast group Pablo Neira Ayuso
  2009-02-09 13:26 ` [PATCH 1/2] netfilter: ctnetlink: allow changing NAT sequence adjustment in creation Patrick McHardy
  0 siblings, 2 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2009-01-27 21:14 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber

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: Pablo Neira Ayuso <pablo@netfilter.org>
---

 net/netfilter/nf_conntrack_netlink.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index ef51e99..016fad5 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1212,6 +1212,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]) {
 		err = ctnetlink_change_protoinfo(ct, cda);
 		if (err < 0) {


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-09 13:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 21:14 [PATCH 1/2] netfilter: ctnetlink: allow changing NAT sequence adjustment in creation Pablo Neira Ayuso
2009-01-27 21:15 ` [PATCH 2/2] netfilter: ctnetlink: fix echo if not subscribed to any multicast group Pablo Neira Ayuso
2009-02-09 13:27   ` Patrick McHardy
2009-02-09 13:26 ` [PATCH 1/2] netfilter: ctnetlink: allow changing NAT sequence adjustment in creation Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).