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 <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
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;

0 commit comments

Comments
 (0)