diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-14 19:37:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:34 -0400 |
commit | 587aa64163bb14f70098f450abab9410787fce9d (patch) | |
tree | 399c00a969d9a8c7af13675583c5417282d18974 /include/net | |
parent | ce18afe57bf53477f133208856dd2b7e6b5db5e3 (diff) |
[NETFILTER]: Remove IPv4 only connection tracking/NAT
Remove the obsolete IPv4 only connection tracking/NAT as scheduled in
feature-removal-schedule.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 5 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_compat.h | 145 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_rule.h | 10 |
3 files changed, 5 insertions, 155 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 0e690e34c00b..1c6b8bd09b9a 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -250,6 +250,11 @@ static inline int nf_ct_is_dying(struct nf_conn *ct) | |||
250 | return test_bit(IPS_DYING_BIT, &ct->status); | 250 | return test_bit(IPS_DYING_BIT, &ct->status); |
251 | } | 251 | } |
252 | 252 | ||
253 | static inline int nf_ct_is_untracked(const struct sk_buff *skb) | ||
254 | { | ||
255 | return (skb->nfct == &nf_conntrack_untracked.ct_general); | ||
256 | } | ||
257 | |||
253 | extern unsigned int nf_conntrack_htable_size; | 258 | extern unsigned int nf_conntrack_htable_size; |
254 | extern int nf_conntrack_checksum; | 259 | extern int nf_conntrack_checksum; |
255 | extern atomic_t nf_conntrack_count; | 260 | extern atomic_t nf_conntrack_count; |
diff --git a/include/net/netfilter/nf_conntrack_compat.h b/include/net/netfilter/nf_conntrack_compat.h deleted file mode 100644 index 6f84c1f7fcd4..000000000000 --- a/include/net/netfilter/nf_conntrack_compat.h +++ /dev/null | |||
@@ -1,145 +0,0 @@ | |||
1 | #ifndef _NF_CONNTRACK_COMPAT_H | ||
2 | #define _NF_CONNTRACK_COMPAT_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE) | ||
7 | |||
8 | #include <linux/netfilter_ipv4/ip_conntrack.h> | ||
9 | #include <linux/socket.h> | ||
10 | |||
11 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK | ||
12 | static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, | ||
13 | u_int32_t *ctinfo) | ||
14 | { | ||
15 | struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo); | ||
16 | |||
17 | if (ct) | ||
18 | return &ct->mark; | ||
19 | else | ||
20 | return NULL; | ||
21 | } | ||
22 | #endif /* CONFIG_IP_NF_CONNTRACK_MARK */ | ||
23 | |||
24 | #ifdef CONFIG_IP_NF_CONNTRACK_SECMARK | ||
25 | static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb, | ||
26 | u_int32_t *ctinfo) | ||
27 | { | ||
28 | struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo); | ||
29 | |||
30 | if (ct) | ||
31 | return &ct->secmark; | ||
32 | else | ||
33 | return NULL; | ||
34 | } | ||
35 | #endif /* CONFIG_IP_NF_CONNTRACK_SECMARK */ | ||
36 | |||
37 | #ifdef CONFIG_IP_NF_CT_ACCT | ||
38 | static inline struct ip_conntrack_counter * | ||
39 | nf_ct_get_counters(const struct sk_buff *skb) | ||
40 | { | ||
41 | enum ip_conntrack_info ctinfo; | ||
42 | struct ip_conntrack *ct = ip_conntrack_get(skb, &ctinfo); | ||
43 | |||
44 | if (ct) | ||
45 | return ct->counters; | ||
46 | else | ||
47 | return NULL; | ||
48 | } | ||
49 | #endif /* CONFIG_IP_NF_CT_ACCT */ | ||
50 | |||
51 | static inline int nf_ct_is_untracked(const struct sk_buff *skb) | ||
52 | { | ||
53 | return (skb->nfct == &ip_conntrack_untracked.ct_general); | ||
54 | } | ||
55 | |||
56 | static inline void nf_ct_untrack(struct sk_buff *skb) | ||
57 | { | ||
58 | skb->nfct = &ip_conntrack_untracked.ct_general; | ||
59 | } | ||
60 | |||
61 | static inline int nf_ct_get_ctinfo(const struct sk_buff *skb, | ||
62 | enum ip_conntrack_info *ctinfo) | ||
63 | { | ||
64 | struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo); | ||
65 | return (ct != NULL); | ||
66 | } | ||
67 | |||
68 | static inline int nf_ct_l3proto_try_module_get(unsigned short l3proto) | ||
69 | { | ||
70 | need_conntrack(); | ||
71 | return l3proto == PF_INET ? 0 : -1; | ||
72 | } | ||
73 | |||
74 | static inline void nf_ct_l3proto_module_put(unsigned short l3proto) | ||
75 | { | ||
76 | } | ||
77 | |||
78 | #else /* CONFIG_IP_NF_CONNTRACK */ | ||
79 | |||
80 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> | ||
81 | #include <net/netfilter/nf_conntrack.h> | ||
82 | |||
83 | #ifdef CONFIG_NF_CONNTRACK_MARK | ||
84 | |||
85 | static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, | ||
86 | u_int32_t *ctinfo) | ||
87 | { | ||
88 | struct nf_conn *ct = nf_ct_get(skb, ctinfo); | ||
89 | |||
90 | if (ct) | ||
91 | return &ct->mark; | ||
92 | else | ||
93 | return NULL; | ||
94 | } | ||
95 | #endif /* CONFIG_NF_CONNTRACK_MARK */ | ||
96 | |||
97 | #ifdef CONFIG_NF_CONNTRACK_SECMARK | ||
98 | static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb, | ||
99 | u_int32_t *ctinfo) | ||
100 | { | ||
101 | struct nf_conn *ct = nf_ct_get(skb, ctinfo); | ||
102 | |||
103 | if (ct) | ||
104 | return &ct->secmark; | ||
105 | else | ||
106 | return NULL; | ||
107 | } | ||
108 | #endif /* CONFIG_NF_CONNTRACK_MARK */ | ||
109 | |||
110 | #ifdef CONFIG_NF_CT_ACCT | ||
111 | static inline struct ip_conntrack_counter * | ||
112 | nf_ct_get_counters(const struct sk_buff *skb) | ||
113 | { | ||
114 | enum ip_conntrack_info ctinfo; | ||
115 | struct nf_conn *ct = nf_ct_get(skb, &ctinfo); | ||
116 | |||
117 | if (ct) | ||
118 | return ct->counters; | ||
119 | else | ||
120 | return NULL; | ||
121 | } | ||
122 | #endif /* CONFIG_NF_CT_ACCT */ | ||
123 | |||
124 | static inline int nf_ct_is_untracked(const struct sk_buff *skb) | ||
125 | { | ||
126 | return (skb->nfct == &nf_conntrack_untracked.ct_general); | ||
127 | } | ||
128 | |||
129 | static inline void nf_ct_untrack(struct sk_buff *skb) | ||
130 | { | ||
131 | skb->nfct = &nf_conntrack_untracked.ct_general; | ||
132 | } | ||
133 | |||
134 | static inline int nf_ct_get_ctinfo(const struct sk_buff *skb, | ||
135 | enum ip_conntrack_info *ctinfo) | ||
136 | { | ||
137 | struct nf_conn *ct = nf_ct_get(skb, ctinfo); | ||
138 | return (ct != NULL); | ||
139 | } | ||
140 | |||
141 | #endif /* CONFIG_IP_NF_CONNTRACK */ | ||
142 | |||
143 | #endif /* __KERNEL__ */ | ||
144 | |||
145 | #endif /* _NF_CONNTRACK_COMPAT_H */ | ||
diff --git a/include/net/netfilter/nf_nat_rule.h b/include/net/netfilter/nf_nat_rule.h index f191c672bcc6..e76565459ad9 100644 --- a/include/net/netfilter/nf_nat_rule.h +++ b/include/net/netfilter/nf_nat_rule.h | |||
@@ -4,16 +4,6 @@ | |||
4 | #include <net/netfilter/nf_nat.h> | 4 | #include <net/netfilter/nf_nat.h> |
5 | #include <linux/netfilter_ipv4/ip_tables.h> | 5 | #include <linux/netfilter_ipv4/ip_tables.h> |
6 | 6 | ||
7 | /* Compatibility definitions for ipt_FOO modules */ | ||
8 | #define ip_nat_range nf_nat_range | ||
9 | #define ip_conntrack_tuple nf_conntrack_tuple | ||
10 | #define ip_conntrack_get nf_ct_get | ||
11 | #define ip_conntrack nf_conn | ||
12 | #define ip_nat_setup_info nf_nat_setup_info | ||
13 | #define ip_nat_multi_range_compat nf_nat_multi_range_compat | ||
14 | #define ip_ct_iterate_cleanup nf_ct_iterate_cleanup | ||
15 | #define IP_NF_ASSERT NF_CT_ASSERT | ||
16 | |||
17 | extern int nf_nat_rule_init(void) __init; | 7 | extern int nf_nat_rule_init(void) __init; |
18 | extern void nf_nat_rule_cleanup(void); | 8 | extern void nf_nat_rule_cleanup(void); |
19 | extern int nf_nat_rule_find(struct sk_buff **pskb, | 9 | extern int nf_nat_rule_find(struct sk_buff **pskb, |