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 /include | |
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 'include')
-rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 4 | ||||
-rw-r--r-- | include/linux/netfilter/nfnetlink_conntrack.h | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 9e0dae07861e..19747e8f71cf 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
@@ -129,6 +129,10 @@ enum ip_conntrack_events | |||
129 | /* Mark is set */ | 129 | /* Mark is set */ |
130 | IPCT_MARK_BIT = 12, | 130 | IPCT_MARK_BIT = 12, |
131 | IPCT_MARK = (1 << IPCT_MARK_BIT), | 131 | IPCT_MARK = (1 << IPCT_MARK_BIT), |
132 | |||
133 | /* NAT sequence adjustment */ | ||
134 | IPCT_NATSEQADJ_BIT = 13, | ||
135 | IPCT_NATSEQADJ = (1 << IPCT_NATSEQADJ_BIT), | ||
132 | }; | 136 | }; |
133 | 137 | ||
134 | enum ip_conntrack_expect_events { | 138 | enum ip_conntrack_expect_events { |
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index 4affa3fe78e0..c19d976b1b75 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
@@ -37,6 +37,8 @@ enum ctattr_type { | |||
37 | CTA_ID, | 37 | CTA_ID, |
38 | CTA_NAT_DST, | 38 | CTA_NAT_DST, |
39 | CTA_TUPLE_MASTER, | 39 | CTA_TUPLE_MASTER, |
40 | CTA_NAT_SEQ_ADJ_ORIG, | ||
41 | CTA_NAT_SEQ_ADJ_REPLY, | ||
40 | __CTA_MAX | 42 | __CTA_MAX |
41 | }; | 43 | }; |
42 | #define CTA_MAX (__CTA_MAX - 1) | 44 | #define CTA_MAX (__CTA_MAX - 1) |
@@ -119,6 +121,14 @@ enum ctattr_protonat { | |||
119 | }; | 121 | }; |
120 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) | 122 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) |
121 | 123 | ||
124 | enum ctattr_natseq { | ||
125 | CTA_NAT_SEQ_CORRECTION_POS, | ||
126 | CTA_NAT_SEQ_OFFSET_BEFORE, | ||
127 | CTA_NAT_SEQ_OFFSET_AFTER, | ||
128 | __CTA_NAT_SEQ_MAX | ||
129 | }; | ||
130 | #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1) | ||
131 | |||
122 | enum ctattr_expect { | 132 | enum ctattr_expect { |
123 | CTA_EXPECT_UNSPEC, | 133 | CTA_EXPECT_UNSPEC, |
124 | CTA_EXPECT_MASTER, | 134 | CTA_EXPECT_MASTER, |