diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-20 21:02:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 21:02:56 -0500 |
commit | c49867347404c46f137a261643ed4fce4376f324 (patch) | |
tree | 0b561e2eae19b0073435a4a73df671eae878c30a /net/ipv4 | |
parent | 1c524830d0b39472f0278989bf1119750a5e234d (diff) |
[NETFILTER]: x_tables: add xt_{match,target} arguments to match/target functions
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
30 files changed, 81 insertions, 22 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 87b3b7920101..9423bd0f070a 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -208,6 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb, | |||
208 | const struct net_device *in, | 208 | const struct net_device *in, |
209 | const struct net_device *out, | 209 | const struct net_device *out, |
210 | unsigned int hooknum, | 210 | unsigned int hooknum, |
211 | const struct xt_target *target, | ||
211 | const void *targinfo, | 212 | const void *targinfo, |
212 | void *userinfo) | 213 | void *userinfo) |
213 | { | 214 | { |
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c index 4715cf5b06c9..0f2a95350e26 100644 --- a/net/ipv4/netfilter/arpt_mangle.c +++ b/net/ipv4/netfilter/arpt_mangle.c | |||
@@ -8,9 +8,10 @@ MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>"); | |||
8 | MODULE_DESCRIPTION("arptables arp payload mangle target"); | 8 | MODULE_DESCRIPTION("arptables arp payload mangle target"); |
9 | 9 | ||
10 | static unsigned int | 10 | static unsigned int |
11 | target(struct sk_buff **pskb, const struct net_device *in, | 11 | target(struct sk_buff **pskb, |
12 | const struct net_device *out, unsigned int hooknum, const void *targinfo, | 12 | const struct net_device *in, const struct net_device *out, |
13 | void *userinfo) | 13 | unsigned int hooknum, const struct xt_target *target, |
14 | const void *targinfo, void *userinfo) | ||
14 | { | 15 | { |
15 | const struct arpt_mangle *mangle = targinfo; | 16 | const struct arpt_mangle *mangle = targinfo; |
16 | struct arphdr *arp; | 17 | struct arphdr *arp; |
@@ -65,8 +66,8 @@ target(struct sk_buff **pskb, const struct net_device *in, | |||
65 | } | 66 | } |
66 | 67 | ||
67 | static int | 68 | static int |
68 | checkentry(const char *tablename, const void *e, void *targinfo, | 69 | checkentry(const char *tablename, const void *e, const struct xt_target *target, |
69 | unsigned int targinfosize, unsigned int hook_mask) | 70 | void *targinfo, unsigned int targinfosize, unsigned int hook_mask) |
70 | { | 71 | { |
71 | const struct arpt_mangle *mangle = targinfo; | 72 | const struct arpt_mangle *mangle = targinfo; |
72 | 73 | ||
diff --git a/net/ipv4/netfilter/ip_nat_rule.c b/net/ipv4/netfilter/ip_nat_rule.c index ef4be3d50553..efba8c4e42e0 100644 --- a/net/ipv4/netfilter/ip_nat_rule.c +++ b/net/ipv4/netfilter/ip_nat_rule.c | |||
@@ -103,6 +103,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb, | |||
103 | const struct net_device *in, | 103 | const struct net_device *in, |
104 | const struct net_device *out, | 104 | const struct net_device *out, |
105 | unsigned int hooknum, | 105 | unsigned int hooknum, |
106 | const struct ipt_target *target, | ||
106 | const void *targinfo, | 107 | const void *targinfo, |
107 | void *userinfo) | 108 | void *userinfo) |
108 | { | 109 | { |
@@ -145,6 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb, | |||
145 | const struct net_device *in, | 146 | const struct net_device *in, |
146 | const struct net_device *out, | 147 | const struct net_device *out, |
147 | unsigned int hooknum, | 148 | unsigned int hooknum, |
149 | const struct ipt_target *target, | ||
148 | const void *targinfo, | 150 | const void *targinfo, |
149 | void *userinfo) | 151 | void *userinfo) |
150 | { | 152 | { |
@@ -170,6 +172,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb, | |||
170 | 172 | ||
171 | static int ipt_snat_checkentry(const char *tablename, | 173 | static int ipt_snat_checkentry(const char *tablename, |
172 | const void *entry, | 174 | const void *entry, |
175 | const struct ipt_target *target, | ||
173 | void *targinfo, | 176 | void *targinfo, |
174 | unsigned int targinfosize, | 177 | unsigned int targinfosize, |
175 | unsigned int hook_mask) | 178 | unsigned int hook_mask) |
@@ -186,6 +189,7 @@ static int ipt_snat_checkentry(const char *tablename, | |||
186 | 189 | ||
187 | static int ipt_dnat_checkentry(const char *tablename, | 190 | static int ipt_dnat_checkentry(const char *tablename, |
188 | const void *entry, | 191 | const void *entry, |
192 | const struct ipt_target *target, | ||
189 | void *targinfo, | 193 | void *targinfo, |
190 | unsigned int targinfosize, | 194 | unsigned int targinfosize, |
191 | unsigned int hook_mask) | 195 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 2381a4aa71d0..cf5b9db05371 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -179,6 +179,7 @@ ipt_error(struct sk_buff **pskb, | |||
179 | const struct net_device *in, | 179 | const struct net_device *in, |
180 | const struct net_device *out, | 180 | const struct net_device *out, |
181 | unsigned int hooknum, | 181 | unsigned int hooknum, |
182 | const struct xt_target *target, | ||
182 | const void *targinfo, | 183 | const void *targinfo, |
183 | void *userinfo) | 184 | void *userinfo) |
184 | { | 185 | { |
@@ -1285,6 +1286,7 @@ static int | |||
1285 | icmp_match(const struct sk_buff *skb, | 1286 | icmp_match(const struct sk_buff *skb, |
1286 | const struct net_device *in, | 1287 | const struct net_device *in, |
1287 | const struct net_device *out, | 1288 | const struct net_device *out, |
1289 | const struct xt_match *match, | ||
1288 | const void *matchinfo, | 1290 | const void *matchinfo, |
1289 | int offset, | 1291 | int offset, |
1290 | unsigned int protoff, | 1292 | unsigned int protoff, |
@@ -1318,6 +1320,7 @@ icmp_match(const struct sk_buff *skb, | |||
1318 | static int | 1320 | static int |
1319 | icmp_checkentry(const char *tablename, | 1321 | icmp_checkentry(const char *tablename, |
1320 | const void *info, | 1322 | const void *info, |
1323 | const struct xt_match *match, | ||
1321 | void *matchinfo, | 1324 | void *matchinfo, |
1322 | unsigned int matchsize, | 1325 | unsigned int matchsize, |
1323 | unsigned int hook_mask) | 1326 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 24f88dd5d8f9..61e11edcd6af 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -311,6 +311,7 @@ target(struct sk_buff **pskb, | |||
311 | const struct net_device *in, | 311 | const struct net_device *in, |
312 | const struct net_device *out, | 312 | const struct net_device *out, |
313 | unsigned int hooknum, | 313 | unsigned int hooknum, |
314 | const struct xt_target *target, | ||
314 | const void *targinfo, | 315 | const void *targinfo, |
315 | void *userinfo) | 316 | void *userinfo) |
316 | { | 317 | { |
@@ -380,6 +381,7 @@ target(struct sk_buff **pskb, | |||
380 | static int | 381 | static int |
381 | checkentry(const char *tablename, | 382 | checkentry(const char *tablename, |
382 | const void *e_void, | 383 | const void *e_void, |
384 | const struct xt_target *target, | ||
383 | void *targinfo, | 385 | void *targinfo, |
384 | unsigned int targinfosize, | 386 | unsigned int targinfosize, |
385 | unsigned int hook_mask) | 387 | unsigned int hook_mask) |
@@ -458,9 +460,10 @@ checkentry(const char *tablename, | |||
458 | } | 460 | } |
459 | 461 | ||
460 | /* drop reference count of cluster config when rule is deleted */ | 462 | /* drop reference count of cluster config when rule is deleted */ |
461 | static void destroy(void *matchinfo, unsigned int matchinfosize) | 463 | static void destroy(const struct xt_target *target, void *targinfo, |
464 | unsigned int targinfosize) | ||
462 | { | 465 | { |
463 | struct ipt_clusterip_tgt_info *cipinfo = matchinfo; | 466 | struct ipt_clusterip_tgt_info *cipinfo = targinfo; |
464 | 467 | ||
465 | /* if no more entries are referencing the config, remove it | 468 | /* if no more entries are referencing the config, remove it |
466 | * from the list and destroy the proc entry */ | 469 | * from the list and destroy the proc entry */ |
diff --git a/net/ipv4/netfilter/ipt_DSCP.c b/net/ipv4/netfilter/ipt_DSCP.c index a202467e4a88..cfb0b90e598a 100644 --- a/net/ipv4/netfilter/ipt_DSCP.c +++ b/net/ipv4/netfilter/ipt_DSCP.c | |||
@@ -29,6 +29,7 @@ target(struct sk_buff **pskb, | |||
29 | const struct net_device *in, | 29 | const struct net_device *in, |
30 | const struct net_device *out, | 30 | const struct net_device *out, |
31 | unsigned int hooknum, | 31 | unsigned int hooknum, |
32 | const struct xt_target *target, | ||
32 | const void *targinfo, | 33 | const void *targinfo, |
33 | void *userinfo) | 34 | void *userinfo) |
34 | { | 35 | { |
@@ -58,6 +59,7 @@ target(struct sk_buff **pskb, | |||
58 | static int | 59 | static int |
59 | checkentry(const char *tablename, | 60 | checkentry(const char *tablename, |
60 | const void *e_void, | 61 | const void *e_void, |
62 | const struct xt_target *target, | ||
61 | void *targinfo, | 63 | void *targinfo, |
62 | unsigned int targinfosize, | 64 | unsigned int targinfosize, |
63 | unsigned int hook_mask) | 65 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c index 1bf1a4063b6f..b9b80f90c84e 100644 --- a/net/ipv4/netfilter/ipt_ECN.c +++ b/net/ipv4/netfilter/ipt_ECN.c | |||
@@ -94,6 +94,7 @@ target(struct sk_buff **pskb, | |||
94 | const struct net_device *in, | 94 | const struct net_device *in, |
95 | const struct net_device *out, | 95 | const struct net_device *out, |
96 | unsigned int hooknum, | 96 | unsigned int hooknum, |
97 | const struct xt_target *target, | ||
97 | const void *targinfo, | 98 | const void *targinfo, |
98 | void *userinfo) | 99 | void *userinfo) |
99 | { | 100 | { |
@@ -114,6 +115,7 @@ target(struct sk_buff **pskb, | |||
114 | static int | 115 | static int |
115 | checkentry(const char *tablename, | 116 | checkentry(const char *tablename, |
116 | const void *e_void, | 117 | const void *e_void, |
118 | const struct xt_target *target, | ||
117 | void *targinfo, | 119 | void *targinfo, |
118 | unsigned int targinfosize, | 120 | unsigned int targinfosize, |
119 | unsigned int hook_mask) | 121 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c index f2c7a9343656..750d3221b280 100644 --- a/net/ipv4/netfilter/ipt_LOG.c +++ b/net/ipv4/netfilter/ipt_LOG.c | |||
@@ -415,6 +415,7 @@ ipt_log_target(struct sk_buff **pskb, | |||
415 | const struct net_device *in, | 415 | const struct net_device *in, |
416 | const struct net_device *out, | 416 | const struct net_device *out, |
417 | unsigned int hooknum, | 417 | unsigned int hooknum, |
418 | const struct xt_target *target, | ||
418 | const void *targinfo, | 419 | const void *targinfo, |
419 | void *userinfo) | 420 | void *userinfo) |
420 | { | 421 | { |
@@ -437,6 +438,7 @@ ipt_log_target(struct sk_buff **pskb, | |||
437 | 438 | ||
438 | static int ipt_log_checkentry(const char *tablename, | 439 | static int ipt_log_checkentry(const char *tablename, |
439 | const void *e, | 440 | const void *e, |
441 | const struct xt_target *target, | ||
440 | void *targinfo, | 442 | void *targinfo, |
441 | unsigned int targinfosize, | 443 | unsigned int targinfosize, |
442 | unsigned int hook_mask) | 444 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index df5ea08f1a15..e0c321c3bae5 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c | |||
@@ -41,6 +41,7 @@ static DEFINE_RWLOCK(masq_lock); | |||
41 | static int | 41 | static int |
42 | masquerade_check(const char *tablename, | 42 | masquerade_check(const char *tablename, |
43 | const void *e, | 43 | const void *e, |
44 | const struct xt_target *target, | ||
44 | void *targinfo, | 45 | void *targinfo, |
45 | unsigned int targinfosize, | 46 | unsigned int targinfosize, |
46 | unsigned int hook_mask) | 47 | unsigned int hook_mask) |
@@ -63,6 +64,7 @@ masquerade_target(struct sk_buff **pskb, | |||
63 | const struct net_device *in, | 64 | const struct net_device *in, |
64 | const struct net_device *out, | 65 | const struct net_device *out, |
65 | unsigned int hooknum, | 66 | unsigned int hooknum, |
67 | const struct xt_target *target, | ||
66 | const void *targinfo, | 68 | const void *targinfo, |
67 | void *userinfo) | 69 | void *userinfo) |
68 | { | 70 | { |
diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c index 836d67e66391..fba181c2a426 100644 --- a/net/ipv4/netfilter/ipt_NETMAP.c +++ b/net/ipv4/netfilter/ipt_NETMAP.c | |||
@@ -32,6 +32,7 @@ MODULE_DESCRIPTION("iptables 1:1 NAT mapping of IP networks target"); | |||
32 | static int | 32 | static int |
33 | check(const char *tablename, | 33 | check(const char *tablename, |
34 | const void *e, | 34 | const void *e, |
35 | const struct xt_target *target, | ||
35 | void *targinfo, | 36 | void *targinfo, |
36 | unsigned int targinfosize, | 37 | unsigned int targinfosize, |
37 | unsigned int hook_mask) | 38 | unsigned int hook_mask) |
@@ -54,6 +55,7 @@ target(struct sk_buff **pskb, | |||
54 | const struct net_device *in, | 55 | const struct net_device *in, |
55 | const struct net_device *out, | 56 | const struct net_device *out, |
56 | unsigned int hooknum, | 57 | unsigned int hooknum, |
58 | const struct xt_target *target, | ||
57 | const void *targinfo, | 59 | const void *targinfo, |
58 | void *userinfo) | 60 | void *userinfo) |
59 | { | 61 | { |
diff --git a/net/ipv4/netfilter/ipt_REDIRECT.c b/net/ipv4/netfilter/ipt_REDIRECT.c index cc165e09d0b8..be3da7c4b871 100644 --- a/net/ipv4/netfilter/ipt_REDIRECT.c +++ b/net/ipv4/netfilter/ipt_REDIRECT.c | |||
@@ -34,6 +34,7 @@ MODULE_DESCRIPTION("iptables REDIRECT target module"); | |||
34 | static int | 34 | static int |
35 | redirect_check(const char *tablename, | 35 | redirect_check(const char *tablename, |
36 | const void *e, | 36 | const void *e, |
37 | const struct xt_target *target, | ||
37 | void *targinfo, | 38 | void *targinfo, |
38 | unsigned int targinfosize, | 39 | unsigned int targinfosize, |
39 | unsigned int hook_mask) | 40 | unsigned int hook_mask) |
@@ -56,6 +57,7 @@ redirect_target(struct sk_buff **pskb, | |||
56 | const struct net_device *in, | 57 | const struct net_device *in, |
57 | const struct net_device *out, | 58 | const struct net_device *out, |
58 | unsigned int hooknum, | 59 | unsigned int hooknum, |
60 | const struct xt_target *target, | ||
59 | const void *targinfo, | 61 | const void *targinfo, |
60 | void *userinfo) | 62 | void *userinfo) |
61 | { | 63 | { |
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index ddd6bd1b9776..26ea6c19f5bd 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
@@ -236,6 +236,7 @@ static unsigned int reject(struct sk_buff **pskb, | |||
236 | const struct net_device *in, | 236 | const struct net_device *in, |
237 | const struct net_device *out, | 237 | const struct net_device *out, |
238 | unsigned int hooknum, | 238 | unsigned int hooknum, |
239 | const struct xt_target *target, | ||
239 | const void *targinfo, | 240 | const void *targinfo, |
240 | void *userinfo) | 241 | void *userinfo) |
241 | { | 242 | { |
@@ -283,6 +284,7 @@ static unsigned int reject(struct sk_buff **pskb, | |||
283 | 284 | ||
284 | static int check(const char *tablename, | 285 | static int check(const char *tablename, |
285 | const void *e_void, | 286 | const void *e_void, |
287 | const struct xt_target *target, | ||
286 | void *targinfo, | 288 | void *targinfo, |
287 | unsigned int targinfosize, | 289 | unsigned int targinfosize, |
288 | unsigned int hook_mask) | 290 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_SAME.c b/net/ipv4/netfilter/ipt_SAME.c index 8743c3a70157..7e2ebc9d945e 100644 --- a/net/ipv4/netfilter/ipt_SAME.c +++ b/net/ipv4/netfilter/ipt_SAME.c | |||
@@ -50,6 +50,7 @@ MODULE_DESCRIPTION("iptables special SNAT module for consistent sourceip"); | |||
50 | static int | 50 | static int |
51 | same_check(const char *tablename, | 51 | same_check(const char *tablename, |
52 | const void *e, | 52 | const void *e, |
53 | const struct xt_target *target, | ||
53 | void *targinfo, | 54 | void *targinfo, |
54 | unsigned int targinfosize, | 55 | unsigned int targinfosize, |
55 | unsigned int hook_mask) | 56 | unsigned int hook_mask) |
@@ -115,7 +116,7 @@ same_check(const char *tablename, | |||
115 | } | 116 | } |
116 | 117 | ||
117 | static void | 118 | static void |
118 | same_destroy(void *targinfo, | 119 | same_destroy(const struct xt_target *target, void *targinfo, |
119 | unsigned int targinfosize) | 120 | unsigned int targinfosize) |
120 | { | 121 | { |
121 | struct ipt_same_info *mr = targinfo; | 122 | struct ipt_same_info *mr = targinfo; |
@@ -131,6 +132,7 @@ same_target(struct sk_buff **pskb, | |||
131 | const struct net_device *in, | 132 | const struct net_device *in, |
132 | const struct net_device *out, | 133 | const struct net_device *out, |
133 | unsigned int hooknum, | 134 | unsigned int hooknum, |
135 | const struct xt_target *target, | ||
134 | const void *targinfo, | 136 | const void *targinfo, |
135 | void *userinfo) | 137 | void *userinfo) |
136 | { | 138 | { |
diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c index 4be6e2bf26d2..c4fc50ec2ddb 100644 --- a/net/ipv4/netfilter/ipt_TCPMSS.c +++ b/net/ipv4/netfilter/ipt_TCPMSS.c | |||
@@ -48,6 +48,7 @@ ipt_tcpmss_target(struct sk_buff **pskb, | |||
48 | const struct net_device *in, | 48 | const struct net_device *in, |
49 | const struct net_device *out, | 49 | const struct net_device *out, |
50 | unsigned int hooknum, | 50 | unsigned int hooknum, |
51 | const struct xt_target *target, | ||
51 | const void *targinfo, | 52 | const void *targinfo, |
52 | void *userinfo) | 53 | void *userinfo) |
53 | { | 54 | { |
@@ -211,6 +212,7 @@ static inline int find_syn_match(const struct ipt_entry_match *m) | |||
211 | static int | 212 | static int |
212 | ipt_tcpmss_checkentry(const char *tablename, | 213 | ipt_tcpmss_checkentry(const char *tablename, |
213 | const void *e_void, | 214 | const void *e_void, |
215 | const struct xt_target *target, | ||
214 | void *targinfo, | 216 | void *targinfo, |
215 | unsigned int targinfosize, | 217 | unsigned int targinfosize, |
216 | unsigned int hook_mask) | 218 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_TOS.c b/net/ipv4/netfilter/ipt_TOS.c index 6568e3e30e47..9aa7817657f0 100644 --- a/net/ipv4/netfilter/ipt_TOS.c +++ b/net/ipv4/netfilter/ipt_TOS.c | |||
@@ -25,6 +25,7 @@ target(struct sk_buff **pskb, | |||
25 | const struct net_device *in, | 25 | const struct net_device *in, |
26 | const struct net_device *out, | 26 | const struct net_device *out, |
27 | unsigned int hooknum, | 27 | unsigned int hooknum, |
28 | const struct xt_target *target, | ||
28 | const void *targinfo, | 29 | const void *targinfo, |
29 | void *userinfo) | 30 | void *userinfo) |
30 | { | 31 | { |
@@ -53,6 +54,7 @@ target(struct sk_buff **pskb, | |||
53 | static int | 54 | static int |
54 | checkentry(const char *tablename, | 55 | checkentry(const char *tablename, |
55 | const void *e_void, | 56 | const void *e_void, |
57 | const struct xt_target *target, | ||
56 | void *targinfo, | 58 | void *targinfo, |
57 | unsigned int targinfosize, | 59 | unsigned int targinfosize, |
58 | unsigned int hook_mask) | 60 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_TTL.c b/net/ipv4/netfilter/ipt_TTL.c index 61d94e096939..5009a003d578 100644 --- a/net/ipv4/netfilter/ipt_TTL.c +++ b/net/ipv4/netfilter/ipt_TTL.c | |||
@@ -20,9 +20,10 @@ MODULE_DESCRIPTION("IP tables TTL modification module"); | |||
20 | MODULE_LICENSE("GPL"); | 20 | MODULE_LICENSE("GPL"); |
21 | 21 | ||
22 | static unsigned int | 22 | static unsigned int |
23 | ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in, | 23 | ipt_ttl_target(struct sk_buff **pskb, |
24 | const struct net_device *out, unsigned int hooknum, | 24 | const struct net_device *in, const struct net_device *out, |
25 | const void *targinfo, void *userinfo) | 25 | unsigned int hooknum, const struct xt_target *target, |
26 | const void *targinfo, void *userinfo) | ||
26 | { | 27 | { |
27 | struct iphdr *iph; | 28 | struct iphdr *iph; |
28 | const struct ipt_TTL_info *info = targinfo; | 29 | const struct ipt_TTL_info *info = targinfo; |
@@ -67,6 +68,7 @@ ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in, | |||
67 | 68 | ||
68 | static int ipt_ttl_checkentry(const char *tablename, | 69 | static int ipt_ttl_checkentry(const char *tablename, |
69 | const void *e, | 70 | const void *e, |
71 | const struct xt_target *target, | ||
70 | void *targinfo, | 72 | void *targinfo, |
71 | unsigned int targinfosize, | 73 | unsigned int targinfosize, |
72 | unsigned int hook_mask) | 74 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index c95e7e9f74ff..a82a32ed0e2f 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -303,6 +303,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb, | |||
303 | const struct net_device *in, | 303 | const struct net_device *in, |
304 | const struct net_device *out, | 304 | const struct net_device *out, |
305 | unsigned int hooknum, | 305 | unsigned int hooknum, |
306 | const struct xt_target *target, | ||
306 | const void *targinfo, void *userinfo) | 307 | const void *targinfo, void *userinfo) |
307 | { | 308 | { |
308 | struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo; | 309 | struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo; |
@@ -339,6 +340,7 @@ static void ipt_logfn(unsigned int pf, | |||
339 | 340 | ||
340 | static int ipt_ulog_checkentry(const char *tablename, | 341 | static int ipt_ulog_checkentry(const char *tablename, |
341 | const void *e, | 342 | const void *e, |
343 | const struct xt_target *target, | ||
342 | void *targinfo, | 344 | void *targinfo, |
343 | unsigned int targinfosize, | 345 | unsigned int targinfosize, |
344 | unsigned int hookmask) | 346 | unsigned int hookmask) |
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c index ad5dc4658022..5fdf85d0efcf 100644 --- a/net/ipv4/netfilter/ipt_addrtype.c +++ b/net/ipv4/netfilter/ipt_addrtype.c | |||
@@ -27,8 +27,9 @@ static inline int match_type(u_int32_t addr, u_int16_t mask) | |||
27 | return !!(mask & (1 << inet_addr_type(addr))); | 27 | return !!(mask & (1 << inet_addr_type(addr))); |
28 | } | 28 | } |
29 | 29 | ||
30 | static int match(const struct sk_buff *skb, const struct net_device *in, | 30 | static int match(const struct sk_buff *skb, |
31 | const struct net_device *out, const void *matchinfo, | 31 | const struct net_device *in, const struct net_device *out, |
32 | const struct xt_match *match, const void *matchinfo, | ||
32 | int offset, unsigned int protoff, int *hotdrop) | 33 | int offset, unsigned int protoff, int *hotdrop) |
33 | { | 34 | { |
34 | const struct ipt_addrtype_info *info = matchinfo; | 35 | const struct ipt_addrtype_info *info = matchinfo; |
diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c index a33eeea38e1d..35a21fb1f8e0 100644 --- a/net/ipv4/netfilter/ipt_ah.c +++ b/net/ipv4/netfilter/ipt_ah.c | |||
@@ -39,6 +39,7 @@ static int | |||
39 | match(const struct sk_buff *skb, | 39 | match(const struct sk_buff *skb, |
40 | const struct net_device *in, | 40 | const struct net_device *in, |
41 | const struct net_device *out, | 41 | const struct net_device *out, |
42 | const struct xt_match *match, | ||
42 | const void *matchinfo, | 43 | const void *matchinfo, |
43 | int offset, | 44 | int offset, |
44 | unsigned int protoff, | 45 | unsigned int protoff, |
@@ -71,6 +72,7 @@ match(const struct sk_buff *skb, | |||
71 | static int | 72 | static int |
72 | checkentry(const char *tablename, | 73 | checkentry(const char *tablename, |
73 | const void *ip_void, | 74 | const void *ip_void, |
75 | const struct xt_match *match, | ||
74 | void *matchinfo, | 76 | void *matchinfo, |
75 | unsigned int matchinfosize, | 77 | unsigned int matchinfosize, |
76 | unsigned int hook_mask) | 78 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_dscp.c b/net/ipv4/netfilter/ipt_dscp.c index e7889ba22f4c..11963c385dea 100644 --- a/net/ipv4/netfilter/ipt_dscp.c +++ b/net/ipv4/netfilter/ipt_dscp.c | |||
@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | |||
19 | MODULE_DESCRIPTION("iptables DSCP matching module"); | 19 | MODULE_DESCRIPTION("iptables DSCP matching module"); |
20 | MODULE_LICENSE("GPL"); | 20 | MODULE_LICENSE("GPL"); |
21 | 21 | ||
22 | static int match(const struct sk_buff *skb, const struct net_device *in, | 22 | static int match(const struct sk_buff *skb, |
23 | const struct net_device *out, const void *matchinfo, | 23 | const struct net_device *in, const struct net_device *out, |
24 | const struct xt_match *match, const void *matchinfo, | ||
24 | int offset, unsigned int protoff, int *hotdrop) | 25 | int offset, unsigned int protoff, int *hotdrop) |
25 | { | 26 | { |
26 | const struct ipt_dscp_info *info = matchinfo; | 27 | const struct ipt_dscp_info *info = matchinfo; |
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c index 723957f77310..d7e29f6a38d8 100644 --- a/net/ipv4/netfilter/ipt_ecn.c +++ b/net/ipv4/netfilter/ipt_ecn.c | |||
@@ -65,8 +65,9 @@ static inline int match_tcp(const struct sk_buff *skb, | |||
65 | return 1; | 65 | return 1; |
66 | } | 66 | } |
67 | 67 | ||
68 | static int match(const struct sk_buff *skb, const struct net_device *in, | 68 | static int match(const struct sk_buff *skb, |
69 | const struct net_device *out, const void *matchinfo, | 69 | const struct net_device *in, const struct net_device *out, |
70 | const struct xt_match *match, const void *matchinfo, | ||
70 | int offset, unsigned int protoff, int *hotdrop) | 71 | int offset, unsigned int protoff, int *hotdrop) |
71 | { | 72 | { |
72 | const struct ipt_ecn_info *info = matchinfo; | 73 | const struct ipt_ecn_info *info = matchinfo; |
@@ -86,6 +87,7 @@ static int match(const struct sk_buff *skb, const struct net_device *in, | |||
86 | } | 87 | } |
87 | 88 | ||
88 | static int checkentry(const char *tablename, const void *ip_void, | 89 | static int checkentry(const char *tablename, const void *ip_void, |
90 | const struct xt_match *match, | ||
89 | void *matchinfo, unsigned int matchsize, | 91 | void *matchinfo, unsigned int matchsize, |
90 | unsigned int hook_mask) | 92 | unsigned int hook_mask) |
91 | { | 93 | { |
diff --git a/net/ipv4/netfilter/ipt_esp.c b/net/ipv4/netfilter/ipt_esp.c index 984fa4862ce9..af0d5ec79cb5 100644 --- a/net/ipv4/netfilter/ipt_esp.c +++ b/net/ipv4/netfilter/ipt_esp.c | |||
@@ -40,6 +40,7 @@ static int | |||
40 | match(const struct sk_buff *skb, | 40 | match(const struct sk_buff *skb, |
41 | const struct net_device *in, | 41 | const struct net_device *in, |
42 | const struct net_device *out, | 42 | const struct net_device *out, |
43 | const struct xt_match *match, | ||
43 | const void *matchinfo, | 44 | const void *matchinfo, |
44 | int offset, | 45 | int offset, |
45 | unsigned int protoff, | 46 | unsigned int protoff, |
@@ -72,6 +73,7 @@ match(const struct sk_buff *skb, | |||
72 | static int | 73 | static int |
73 | checkentry(const char *tablename, | 74 | checkentry(const char *tablename, |
74 | const void *ip_void, | 75 | const void *ip_void, |
76 | const struct xt_match *match, | ||
75 | void *matchinfo, | 77 | void *matchinfo, |
76 | unsigned int matchinfosize, | 78 | unsigned int matchinfosize, |
77 | unsigned int hook_mask) | 79 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c index 156d9c255b2b..dc1521c5aa81 100644 --- a/net/ipv4/netfilter/ipt_hashlimit.c +++ b/net/ipv4/netfilter/ipt_hashlimit.c | |||
@@ -427,6 +427,7 @@ static int | |||
427 | hashlimit_match(const struct sk_buff *skb, | 427 | hashlimit_match(const struct sk_buff *skb, |
428 | const struct net_device *in, | 428 | const struct net_device *in, |
429 | const struct net_device *out, | 429 | const struct net_device *out, |
430 | const struct xt_match *match, | ||
430 | const void *matchinfo, | 431 | const void *matchinfo, |
431 | int offset, | 432 | int offset, |
432 | unsigned int protoff, | 433 | unsigned int protoff, |
@@ -506,6 +507,7 @@ hashlimit_match(const struct sk_buff *skb, | |||
506 | static int | 507 | static int |
507 | hashlimit_checkentry(const char *tablename, | 508 | hashlimit_checkentry(const char *tablename, |
508 | const void *inf, | 509 | const void *inf, |
510 | const struct xt_match *match, | ||
509 | void *matchinfo, | 511 | void *matchinfo, |
510 | unsigned int matchsize, | 512 | unsigned int matchsize, |
511 | unsigned int hook_mask) | 513 | unsigned int hook_mask) |
@@ -555,7 +557,8 @@ hashlimit_checkentry(const char *tablename, | |||
555 | } | 557 | } |
556 | 558 | ||
557 | static void | 559 | static void |
558 | hashlimit_destroy(void *matchinfo, unsigned int matchsize) | 560 | hashlimit_destroy(const struct xt_match *match, void *matchinfo, |
561 | unsigned int matchsize) | ||
559 | { | 562 | { |
560 | struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo; | 563 | struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo; |
561 | 564 | ||
diff --git a/net/ipv4/netfilter/ipt_iprange.c b/net/ipv4/netfilter/ipt_iprange.c index 0885ff5d0db7..ae70112f5e06 100644 --- a/net/ipv4/netfilter/ipt_iprange.c +++ b/net/ipv4/netfilter/ipt_iprange.c | |||
@@ -27,6 +27,7 @@ static int | |||
27 | match(const struct sk_buff *skb, | 27 | match(const struct sk_buff *skb, |
28 | const struct net_device *in, | 28 | const struct net_device *in, |
29 | const struct net_device *out, | 29 | const struct net_device *out, |
30 | const struct xt_match *match, | ||
30 | const void *matchinfo, | 31 | const void *matchinfo, |
31 | int offset, unsigned int protoff, int *hotdrop) | 32 | int offset, unsigned int protoff, int *hotdrop) |
32 | { | 33 | { |
diff --git a/net/ipv4/netfilter/ipt_multiport.c b/net/ipv4/netfilter/ipt_multiport.c index 8f1684c3e5c6..bd07f7c53872 100644 --- a/net/ipv4/netfilter/ipt_multiport.c +++ b/net/ipv4/netfilter/ipt_multiport.c | |||
@@ -95,6 +95,7 @@ static int | |||
95 | match(const struct sk_buff *skb, | 95 | match(const struct sk_buff *skb, |
96 | const struct net_device *in, | 96 | const struct net_device *in, |
97 | const struct net_device *out, | 97 | const struct net_device *out, |
98 | const struct xt_match *match, | ||
98 | const void *matchinfo, | 99 | const void *matchinfo, |
99 | int offset, | 100 | int offset, |
100 | unsigned int protoff, | 101 | unsigned int protoff, |
@@ -127,6 +128,7 @@ static int | |||
127 | match_v1(const struct sk_buff *skb, | 128 | match_v1(const struct sk_buff *skb, |
128 | const struct net_device *in, | 129 | const struct net_device *in, |
129 | const struct net_device *out, | 130 | const struct net_device *out, |
131 | const struct xt_match *match, | ||
130 | const void *matchinfo, | 132 | const void *matchinfo, |
131 | int offset, | 133 | int offset, |
132 | unsigned int protoff, | 134 | unsigned int protoff, |
diff --git a/net/ipv4/netfilter/ipt_owner.c b/net/ipv4/netfilter/ipt_owner.c index 18adc1d214d4..3900428771f3 100644 --- a/net/ipv4/netfilter/ipt_owner.c +++ b/net/ipv4/netfilter/ipt_owner.c | |||
@@ -25,6 +25,7 @@ static int | |||
25 | match(const struct sk_buff *skb, | 25 | match(const struct sk_buff *skb, |
26 | const struct net_device *in, | 26 | const struct net_device *in, |
27 | const struct net_device *out, | 27 | const struct net_device *out, |
28 | const struct xt_match *match, | ||
28 | const void *matchinfo, | 29 | const void *matchinfo, |
29 | int offset, | 30 | int offset, |
30 | unsigned int protoff, | 31 | unsigned int protoff, |
@@ -53,6 +54,7 @@ match(const struct sk_buff *skb, | |||
53 | static int | 54 | static int |
54 | checkentry(const char *tablename, | 55 | checkentry(const char *tablename, |
55 | const void *ip, | 56 | const void *ip, |
57 | const struct xt_match *match, | ||
56 | void *matchinfo, | 58 | void *matchinfo, |
57 | unsigned int matchsize, | 59 | unsigned int matchsize, |
58 | unsigned int hook_mask) | 60 | unsigned int hook_mask) |
diff --git a/net/ipv4/netfilter/ipt_policy.c b/net/ipv4/netfilter/ipt_policy.c index 3fa6607c0c6c..b73f590b226b 100644 --- a/net/ipv4/netfilter/ipt_policy.c +++ b/net/ipv4/netfilter/ipt_policy.c | |||
@@ -98,6 +98,7 @@ match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info) | |||
98 | static int match(const struct sk_buff *skb, | 98 | static int match(const struct sk_buff *skb, |
99 | const struct net_device *in, | 99 | const struct net_device *in, |
100 | const struct net_device *out, | 100 | const struct net_device *out, |
101 | const struct xt_match *match, | ||
101 | const void *matchinfo, | 102 | const void *matchinfo, |
102 | int offset, | 103 | int offset, |
103 | unsigned int protoff, | 104 | unsigned int protoff, |
@@ -120,6 +121,7 @@ static int match(const struct sk_buff *skb, | |||
120 | } | 121 | } |
121 | 122 | ||
122 | static int checkentry(const char *tablename, const void *ip_void, | 123 | static int checkentry(const char *tablename, const void *ip_void, |
124 | const struct xt_match *match, | ||
123 | void *matchinfo, unsigned int matchsize, | 125 | void *matchinfo, unsigned int matchsize, |
124 | unsigned int hook_mask) | 126 | unsigned int hook_mask) |
125 | { | 127 | { |
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index e2ccd4295344..06792ead1da4 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c | |||
@@ -102,6 +102,7 @@ static int | |||
102 | match(const struct sk_buff *skb, | 102 | match(const struct sk_buff *skb, |
103 | const struct net_device *in, | 103 | const struct net_device *in, |
104 | const struct net_device *out, | 104 | const struct net_device *out, |
105 | const struct xt_match *match, | ||
105 | const void *matchinfo, | 106 | const void *matchinfo, |
106 | int offset, | 107 | int offset, |
107 | unsigned int protoff, | 108 | unsigned int protoff, |
@@ -318,7 +319,7 @@ static int ip_recent_ctrl(struct file *file, const char __user *input, unsigned | |||
318 | skb->nh.iph->daddr = 0; | 319 | skb->nh.iph->daddr = 0; |
319 | /* Clear ttl since we have no way of knowing it */ | 320 | /* Clear ttl since we have no way of knowing it */ |
320 | skb->nh.iph->ttl = 0; | 321 | skb->nh.iph->ttl = 0; |
321 | match(skb,NULL,NULL,info,0,0,NULL); | 322 | match(skb,NULL,NULL,NULL,info,0,0,NULL); |
322 | 323 | ||
323 | kfree(skb->nh.iph); | 324 | kfree(skb->nh.iph); |
324 | out_free_skb: | 325 | out_free_skb: |
@@ -356,6 +357,7 @@ static int | |||
356 | match(const struct sk_buff *skb, | 357 | match(const struct sk_buff *skb, |
357 | const struct net_device *in, | 358 | const struct net_device *in, |
358 | const struct net_device *out, | 359 | const struct net_device *out, |
360 | const struct xt_match *match, | ||
359 | const void *matchinfo, | 361 | const void *matchinfo, |
360 | int offset, | 362 | int offset, |
361 | unsigned int protoff, | 363 | unsigned int protoff, |
@@ -657,6 +659,7 @@ match(const struct sk_buff *skb, | |||
657 | static int | 659 | static int |
658 | checkentry(const char *tablename, | 660 | checkentry(const char *tablename, |
659 | const void *ip, | 661 | const void *ip, |
662 | const struct xt_match *match, | ||
660 | void *matchinfo, | 663 | void *matchinfo, |
661 | unsigned int matchsize, | 664 | unsigned int matchsize, |
662 | unsigned int hook_mask) | 665 | unsigned int hook_mask) |
@@ -869,7 +872,7 @@ checkentry(const char *tablename, | |||
869 | * up its memory. | 872 | * up its memory. |
870 | */ | 873 | */ |
871 | static void | 874 | static void |
872 | destroy(void *matchinfo, unsigned int matchsize) | 875 | destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) |
873 | { | 876 | { |
874 | const struct ipt_recent_info *info = matchinfo; | 877 | const struct ipt_recent_info *info = matchinfo; |
875 | struct recent_ip_tables *curr_table, *last_table; | 878 | struct recent_ip_tables *curr_table, *last_table; |
diff --git a/net/ipv4/netfilter/ipt_tos.c b/net/ipv4/netfilter/ipt_tos.c index 4675c786189b..e404e92ddd01 100644 --- a/net/ipv4/netfilter/ipt_tos.c +++ b/net/ipv4/netfilter/ipt_tos.c | |||
@@ -21,6 +21,7 @@ static int | |||
21 | match(const struct sk_buff *skb, | 21 | match(const struct sk_buff *skb, |
22 | const struct net_device *in, | 22 | const struct net_device *in, |
23 | const struct net_device *out, | 23 | const struct net_device *out, |
24 | const struct xt_match *match, | ||
24 | const void *matchinfo, | 25 | const void *matchinfo, |
25 | int offset, | 26 | int offset, |
26 | unsigned int protoff, | 27 | unsigned int protoff, |
diff --git a/net/ipv4/netfilter/ipt_ttl.c b/net/ipv4/netfilter/ipt_ttl.c index bb694a0b361d..ae7ce4d8d90e 100644 --- a/net/ipv4/netfilter/ipt_ttl.c +++ b/net/ipv4/netfilter/ipt_ttl.c | |||
@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); | |||
19 | MODULE_DESCRIPTION("IP tables TTL matching module"); | 19 | MODULE_DESCRIPTION("IP tables TTL matching module"); |
20 | MODULE_LICENSE("GPL"); | 20 | MODULE_LICENSE("GPL"); |
21 | 21 | ||
22 | static int match(const struct sk_buff *skb, const struct net_device *in, | 22 | static int match(const struct sk_buff *skb, |
23 | const struct net_device *out, const void *matchinfo, | 23 | const struct net_device *in, const struct net_device *out, |
24 | const struct xt_match *match, const void *matchinfo, | ||
24 | int offset, unsigned int protoff, int *hotdrop) | 25 | int offset, unsigned int protoff, int *hotdrop) |
25 | { | 26 | { |
26 | const struct ipt_ttl_info *info = matchinfo; | 27 | const struct ipt_ttl_info *info = matchinfo; |