diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2007-12-18 01:28:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:58:50 -0500 |
commit | 13eae15a244bb29beaa47bf86a24fd29ca7f8a4c (patch) | |
tree | 27a1a1e6498033c5aa440ced5242016fd808c560 /net/ipv4 | |
parent | 170080645dac61816455afad807ffeb326ce79e8 (diff) |
[NETFILTER]: ctnetlink: add support for NAT sequence adjustments
The combination of NAT and helpers may produce TCP sequence adjustments.
In failover setups, this information needs to be replicated in order to
achieve a successful recovery of mangled, related connections. This patch is
particularly useful for conntrackd, see:
http://people.netfilter.org/pablo/conntrack-tools/
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_nat_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c index 53f79a310b4..d24f3d94739 100644 --- a/net/ipv4/netfilter/nf_nat_helper.c +++ b/net/ipv4/netfilter/nf_nat_helper.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/netfilter_ipv4.h> | 20 | #include <linux/netfilter_ipv4.h> |
21 | #include <net/netfilter/nf_conntrack.h> | 21 | #include <net/netfilter/nf_conntrack.h> |
22 | #include <net/netfilter/nf_conntrack_helper.h> | 22 | #include <net/netfilter/nf_conntrack_helper.h> |
23 | #include <net/netfilter/nf_conntrack_ecache.h> | ||
23 | #include <net/netfilter/nf_conntrack_expect.h> | 24 | #include <net/netfilter/nf_conntrack_expect.h> |
24 | #include <net/netfilter/nf_nat.h> | 25 | #include <net/netfilter/nf_nat.h> |
25 | #include <net/netfilter/nf_nat_protocol.h> | 26 | #include <net/netfilter/nf_nat_protocol.h> |
@@ -191,6 +192,8 @@ nf_nat_mangle_tcp_packet(struct sk_buff *skb, | |||
191 | /* Tell TCP window tracking about seq change */ | 192 | /* Tell TCP window tracking about seq change */ |
192 | nf_conntrack_tcp_update(skb, ip_hdrlen(skb), | 193 | nf_conntrack_tcp_update(skb, ip_hdrlen(skb), |
193 | ct, CTINFO2DIR(ctinfo)); | 194 | ct, CTINFO2DIR(ctinfo)); |
195 | |||
196 | nf_conntrack_event_cache(IPCT_NATSEQADJ, skb); | ||
194 | } | 197 | } |
195 | return 1; | 198 | return 1; |
196 | } | 199 | } |