Skip to content

Commit fe1cb10

Browse files
kaberDavid S. Miller
authored andcommitted
[NETFILTER]: x_tables: remove unused argument to target functions
Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4470bbc commit fe1cb10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+55
-90
lines changed

include/linux/netfilter/x_tables.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ struct xt_target
211211
const struct net_device *out,
212212
unsigned int hooknum,
213213
const struct xt_target *target,
214-
const void *targinfo,
215-
void *userdata);
214+
const void *targinfo);
216215

217216
/* Called when user tries to insert an entry of this type:
218217
hook_mask is a bitmask of hooks from which it can be

include/linux/netfilter_arp/arp_tables.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ extern unsigned int arpt_do_table(struct sk_buff **pskb,
248248
unsigned int hook,
249249
const struct net_device *in,
250250
const struct net_device *out,
251-
struct arpt_table *table,
252-
void *userdata);
251+
struct arpt_table *table);
253252

254253
#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1))
255254
#endif /*__KERNEL__*/

include/linux/netfilter_ipv4/ip_tables.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb,
312312
unsigned int hook,
313313
const struct net_device *in,
314314
const struct net_device *out,
315-
struct ipt_table *table,
316-
void *userdata);
315+
struct ipt_table *table);
317316

318317
#define IPT_ALIGN(s) XT_ALIGN(s)
319318

include/linux/netfilter_ipv6/ip6_tables.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb,
300300
unsigned int hook,
301301
const struct net_device *in,
302302
const struct net_device *out,
303-
struct ip6t_table *table,
304-
void *userdata);
303+
struct ip6t_table *table);
305304

306305
/* Check for an extension */
307306
extern int ip6t_ext_hdr(u8 nexthdr);

net/ipv4/netfilter/arp_tables.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb,
208208
const struct net_device *out,
209209
unsigned int hooknum,
210210
const struct xt_target *target,
211-
const void *targinfo,
212-
void *userinfo)
211+
const void *targinfo)
213212
{
214213
if (net_ratelimit())
215214
printk("arp_tables: error: '%s'\n", (char *)targinfo);
@@ -226,8 +225,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
226225
unsigned int hook,
227226
const struct net_device *in,
228227
const struct net_device *out,
229-
struct arpt_table *table,
230-
void *userdata)
228+
struct arpt_table *table)
231229
{
232230
static const char nulldevname[IFNAMSIZ];
233231
unsigned int verdict = NF_DROP;
@@ -302,8 +300,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
302300
in, out,
303301
hook,
304302
t->u.kernel.target,
305-
t->data,
306-
userdata);
303+
t->data);
307304

308305
/* Target might have changed stuff. */
309306
arp = (*pskb)->nh.arph;

net/ipv4/netfilter/arpt_mangle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static unsigned int
1111
target(struct sk_buff **pskb,
1212
const struct net_device *in, const struct net_device *out,
1313
unsigned int hooknum, const struct xt_target *target,
14-
const void *targinfo, void *userinfo)
14+
const void *targinfo)
1515
{
1616
const struct arpt_mangle *mangle = targinfo;
1717
struct arphdr *arp;

net/ipv4/netfilter/arptable_filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static unsigned int arpt_hook(unsigned int hook,
155155
const struct net_device *out,
156156
int (*okfn)(struct sk_buff *))
157157
{
158-
return arpt_do_table(pskb, hook, in, out, &packet_filter, NULL);
158+
return arpt_do_table(pskb, hook, in, out, &packet_filter);
159159
}
160160

161161
static struct nf_hook_ops arpt_ops[] = {

net/ipv4/netfilter/ip_nat_rule.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb,
104104
const struct net_device *out,
105105
unsigned int hooknum,
106106
const struct ipt_target *target,
107-
const void *targinfo,
108-
void *userinfo)
107+
const void *targinfo)
109108
{
110109
struct ip_conntrack *ct;
111110
enum ip_conntrack_info ctinfo;
@@ -147,8 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
147146
const struct net_device *out,
148147
unsigned int hooknum,
149148
const struct ipt_target *target,
150-
const void *targinfo,
151-
void *userinfo)
149+
const void *targinfo)
152150
{
153151
struct ip_conntrack *ct;
154152
enum ip_conntrack_info ctinfo;
@@ -255,7 +253,7 @@ int ip_nat_rule_find(struct sk_buff **pskb,
255253
{
256254
int ret;
257255

258-
ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL);
256+
ret = ipt_do_table(pskb, hooknum, in, out, &nat_table);
259257

260258
if (ret == NF_ACCEPT) {
261259
if (!ip_nat_initialized(ct, HOOK2MANIP(hooknum)))

net/ipv4/netfilter/ip_tables.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ ipt_error(struct sk_buff **pskb,
180180
const struct net_device *out,
181181
unsigned int hooknum,
182182
const struct xt_target *target,
183-
const void *targinfo,
184-
void *userinfo)
183+
const void *targinfo)
185184
{
186185
if (net_ratelimit())
187186
printk("ip_tables: error: `%s'\n", (char *)targinfo);
@@ -217,8 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
217216
unsigned int hook,
218217
const struct net_device *in,
219218
const struct net_device *out,
220-
struct ipt_table *table,
221-
void *userdata)
219+
struct ipt_table *table)
222220
{
223221
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
224222
u_int16_t offset;
@@ -308,8 +306,7 @@ ipt_do_table(struct sk_buff **pskb,
308306
in, out,
309307
hook,
310308
t->u.kernel.target,
311-
t->data,
312-
userdata);
309+
t->data);
313310

314311
#ifdef CONFIG_NETFILTER_DEBUG
315312
if (((struct ipt_entry *)table_base)->comefrom

net/ipv4/netfilter/ipt_CLUSTERIP.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ target(struct sk_buff **pskb,
302302
const struct net_device *out,
303303
unsigned int hooknum,
304304
const struct xt_target *target,
305-
const void *targinfo,
306-
void *userinfo)
305+
const void *targinfo)
307306
{
308307
const struct ipt_clusterip_tgt_info *cipinfo = targinfo;
309308
enum ip_conntrack_info ctinfo;

net/ipv4/netfilter/ipt_ECN.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ target(struct sk_buff **pskb,
8585
const struct net_device *out,
8686
unsigned int hooknum,
8787
const struct xt_target *target,
88-
const void *targinfo,
89-
void *userinfo)
88+
const void *targinfo)
9089
{
9190
const struct ipt_ECN_info *einfo = targinfo;
9291

net/ipv4/netfilter/ipt_LOG.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ ipt_log_target(struct sk_buff **pskb,
416416
const struct net_device *out,
417417
unsigned int hooknum,
418418
const struct xt_target *target,
419-
const void *targinfo,
420-
void *userinfo)
419+
const void *targinfo)
421420
{
422421
const struct ipt_log_info *loginfo = targinfo;
423422
struct nf_loginfo li;

net/ipv4/netfilter/ipt_MASQUERADE.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ masquerade_target(struct sk_buff **pskb,
6464
const struct net_device *out,
6565
unsigned int hooknum,
6666
const struct xt_target *target,
67-
const void *targinfo,
68-
void *userinfo)
67+
const void *targinfo)
6968
{
7069
struct ip_conntrack *ct;
7170
enum ip_conntrack_info ctinfo;

net/ipv4/netfilter/ipt_NETMAP.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ target(struct sk_buff **pskb,
5555
const struct net_device *out,
5656
unsigned int hooknum,
5757
const struct xt_target *target,
58-
const void *targinfo,
59-
void *userinfo)
58+
const void *targinfo)
6059
{
6160
struct ip_conntrack *ct;
6261
enum ip_conntrack_info ctinfo;

net/ipv4/netfilter/ipt_REDIRECT.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ redirect_target(struct sk_buff **pskb,
5858
const struct net_device *out,
5959
unsigned int hooknum,
6060
const struct xt_target *target,
61-
const void *targinfo,
62-
void *userinfo)
61+
const void *targinfo)
6362
{
6463
struct ip_conntrack *ct;
6564
enum ip_conntrack_info ctinfo;

net/ipv4/netfilter/ipt_REJECT.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ static unsigned int reject(struct sk_buff **pskb,
228228
const struct net_device *out,
229229
unsigned int hooknum,
230230
const struct xt_target *target,
231-
const void *targinfo,
232-
void *userinfo)
231+
const void *targinfo)
233232
{
234233
const struct ipt_reject_info *reject = targinfo;
235234

net/ipv4/netfilter/ipt_SAME.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ same_target(struct sk_buff **pskb,
133133
const struct net_device *out,
134134
unsigned int hooknum,
135135
const struct xt_target *target,
136-
const void *targinfo,
137-
void *userinfo)
136+
const void *targinfo)
138137
{
139138
struct ip_conntrack *ct;
140139
enum ip_conntrack_info ctinfo;

net/ipv4/netfilter/ipt_TCPMSS.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
4141
const struct net_device *out,
4242
unsigned int hooknum,
4343
const struct xt_target *target,
44-
const void *targinfo,
45-
void *userinfo)
44+
const void *targinfo)
4645
{
4746
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
4847
struct tcphdr *tcph;

net/ipv4/netfilter/ipt_TOS.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ target(struct sk_buff **pskb,
2626
const struct net_device *out,
2727
unsigned int hooknum,
2828
const struct xt_target *target,
29-
const void *targinfo,
30-
void *userinfo)
29+
const void *targinfo)
3130
{
3231
const struct ipt_tos_target_info *tosinfo = targinfo;
3332
struct iphdr *iph = (*pskb)->nh.iph;

net/ipv4/netfilter/ipt_TTL.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static unsigned int
2323
ipt_ttl_target(struct sk_buff **pskb,
2424
const struct net_device *in, const struct net_device *out,
2525
unsigned int hooknum, const struct xt_target *target,
26-
const void *targinfo, void *userinfo)
26+
const void *targinfo)
2727
{
2828
struct iphdr *iph;
2929
const struct ipt_TTL_info *info = targinfo;

net/ipv4/netfilter/ipt_ULOG.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
308308
const struct net_device *out,
309309
unsigned int hooknum,
310310
const struct xt_target *target,
311-
const void *targinfo, void *userinfo)
311+
const void *targinfo)
312312
{
313313
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
314314

net/ipv4/netfilter/iptable_filter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ ipt_hook(unsigned int hook,
9090
const struct net_device *out,
9191
int (*okfn)(struct sk_buff *))
9292
{
93-
return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
93+
return ipt_do_table(pskb, hook, in, out, &packet_filter);
9494
}
9595

9696
static unsigned int
@@ -108,7 +108,7 @@ ipt_local_out_hook(unsigned int hook,
108108
return NF_ACCEPT;
109109
}
110110

111-
return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
111+
return ipt_do_table(pskb, hook, in, out, &packet_filter);
112112
}
113113

114114
static struct nf_hook_ops ipt_ops[] = {

net/ipv4/netfilter/iptable_mangle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ ipt_route_hook(unsigned int hook,
119119
const struct net_device *out,
120120
int (*okfn)(struct sk_buff *))
121121
{
122-
return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
122+
return ipt_do_table(pskb, hook, in, out, &packet_mangler);
123123
}
124124

125125
static unsigned int
@@ -148,7 +148,7 @@ ipt_local_hook(unsigned int hook,
148148
daddr = (*pskb)->nh.iph->daddr;
149149
tos = (*pskb)->nh.iph->tos;
150150

151-
ret = ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
151+
ret = ipt_do_table(pskb, hook, in, out, &packet_mangler);
152152
/* Reroute for ANY change. */
153153
if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
154154
&& ((*pskb)->nh.iph->saddr != saddr

net/ipv4/netfilter/iptable_raw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ ipt_hook(unsigned int hook,
9595
const struct net_device *out,
9696
int (*okfn)(struct sk_buff *))
9797
{
98-
return ipt_do_table(pskb, hook, in, out, &packet_raw, NULL);
98+
return ipt_do_table(pskb, hook, in, out, &packet_raw);
9999
}
100100

101101
/* 'raw' is the very first table. */

net/ipv6/netfilter/ip6_tables.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ ip6t_error(struct sk_buff **pskb,
220220
const struct net_device *out,
221221
unsigned int hooknum,
222222
const struct xt_target *target,
223-
const void *targinfo,
224-
void *userinfo)
223+
const void *targinfo)
225224
{
226225
if (net_ratelimit())
227226
printk("ip6_tables: error: `%s'\n", (char *)targinfo);
@@ -258,8 +257,7 @@ ip6t_do_table(struct sk_buff **pskb,
258257
unsigned int hook,
259258
const struct net_device *in,
260259
const struct net_device *out,
261-
struct xt_table *table,
262-
void *userdata)
260+
struct xt_table *table)
263261
{
264262
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
265263
int offset = 0;
@@ -349,8 +347,7 @@ ip6t_do_table(struct sk_buff **pskb,
349347
in, out,
350348
hook,
351349
t->u.kernel.target,
352-
t->data,
353-
userdata);
350+
t->data);
354351

355352
#ifdef CONFIG_NETFILTER_DEBUG
356353
if (((struct ip6t_entry *)table_base)->comefrom

net/ipv6/netfilter/ip6t_HL.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
2222
const struct net_device *out,
2323
unsigned int hooknum,
2424
const struct xt_target *target,
25-
const void *targinfo, void *userinfo)
25+
const void *targinfo)
2626
{
2727
struct ipv6hdr *ip6h;
2828
const struct ip6t_HL_info *info = targinfo;

net/ipv6/netfilter/ip6t_LOG.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,7 @@ ip6t_log_target(struct sk_buff **pskb,
427427
const struct net_device *out,
428428
unsigned int hooknum,
429429
const struct xt_target *target,
430-
const void *targinfo,
431-
void *userinfo)
430+
const void *targinfo)
432431
{
433432
const struct ip6t_log_info *loginfo = targinfo;
434433
struct nf_loginfo li;

net/ipv6/netfilter/ip6t_REJECT.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ static unsigned int reject6_target(struct sk_buff **pskb,
180180
const struct net_device *out,
181181
unsigned int hooknum,
182182
const struct xt_target *target,
183-
const void *targinfo,
184-
void *userinfo)
183+
const void *targinfo)
185184
{
186185
const struct ip6t_reject_info *reject = targinfo;
187186

net/ipv6/netfilter/ip6table_filter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ ip6t_hook(unsigned int hook,
108108
const struct net_device *out,
109109
int (*okfn)(struct sk_buff *))
110110
{
111-
return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
111+
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
112112
}
113113

114114
static unsigned int
@@ -128,7 +128,7 @@ ip6t_local_out_hook(unsigned int hook,
128128
}
129129
#endif
130130

131-
return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
131+
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
132132
}
133133

134134
static struct nf_hook_ops ip6t_ops[] = {

0 commit comments

Comments
 (0)