Skip to content

Commit

Permalink
[NETFILTER]: x_tables: remove unused argument to target functions
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
kaber authored and David S. Miller committed Sep 22, 2006
1 parent 4470bbc commit fe1cb10
Show file tree
Hide file tree
Showing 41 changed files with 55 additions and 90 deletions.
3 changes: 1 addition & 2 deletions include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ struct xt_target
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userdata);
const void *targinfo);

/* Called when user tries to insert an entry of this type:
hook_mask is a bitmask of hooks from which it can be
Expand Down
3 changes: 1 addition & 2 deletions include/linux/netfilter_arp/arp_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ extern unsigned int arpt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct arpt_table *table,
void *userdata);
struct arpt_table *table);

#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1))
#endif /*__KERNEL__*/
Expand Down
3 changes: 1 addition & 2 deletions include/linux/netfilter_ipv4/ip_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct ipt_table *table,
void *userdata);
struct ipt_table *table);

#define IPT_ALIGN(s) XT_ALIGN(s)

Expand Down
3 changes: 1 addition & 2 deletions include/linux/netfilter_ipv6/ip6_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct ip6t_table *table,
void *userdata);
struct ip6t_table *table);

/* Check for an extension */
extern int ip6t_ext_hdr(u8 nexthdr);
Expand Down
9 changes: 3 additions & 6 deletions net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
if (net_ratelimit())
printk("arp_tables: error: '%s'\n", (char *)targinfo);
Expand All @@ -226,8 +225,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct arpt_table *table,
void *userdata)
struct arpt_table *table)
{
static const char nulldevname[IFNAMSIZ];
unsigned int verdict = NF_DROP;
Expand Down Expand Up @@ -302,8 +300,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
in, out,
hook,
t->u.kernel.target,
t->data,
userdata);
t->data);

/* Target might have changed stuff. */
arp = (*pskb)->nh.arph;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arpt_mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static unsigned int
target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *out,
unsigned int hooknum, const struct xt_target *target,
const void *targinfo, void *userinfo)
const void *targinfo)
{
const struct arpt_mangle *mangle = targinfo;
struct arphdr *arp;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arptable_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static unsigned int arpt_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return arpt_do_table(pskb, hook, in, out, &packet_filter, NULL);
return arpt_do_table(pskb, hook, in, out, &packet_filter);
}

static struct nf_hook_ops arpt_ops[] = {
Expand Down
8 changes: 3 additions & 5 deletions net/ipv4/netfilter/ip_nat_rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct ipt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down Expand Up @@ -147,8 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct ipt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down Expand Up @@ -255,7 +253,7 @@ int ip_nat_rule_find(struct sk_buff **pskb,
{
int ret;

ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL);
ret = ipt_do_table(pskb, hooknum, in, out, &nat_table);

if (ret == NF_ACCEPT) {
if (!ip_nat_initialized(ct, HOOK2MANIP(hooknum)))
Expand Down
9 changes: 3 additions & 6 deletions net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ ipt_error(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
if (net_ratelimit())
printk("ip_tables: error: `%s'\n", (char *)targinfo);
Expand Down Expand Up @@ -217,8 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct ipt_table *table,
void *userdata)
struct ipt_table *table)
{
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
u_int16_t offset;
Expand Down Expand Up @@ -308,8 +306,7 @@ ipt_do_table(struct sk_buff **pskb,
in, out,
hook,
t->u.kernel.target,
t->data,
userdata);
t->data);

#ifdef CONFIG_NETFILTER_DEBUG
if (((struct ipt_entry *)table_base)->comefrom
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_clusterip_tgt_info *cipinfo = targinfo;
enum ip_conntrack_info ctinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_ECN.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_ECN_info *einfo = targinfo;

Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ ipt_log_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_log_info *loginfo = targinfo;
struct nf_loginfo li;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_MASQUERADE.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ masquerade_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_NETMAP.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_REDIRECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ redirect_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ static unsigned int reject(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_reject_info *reject = targinfo;

Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_SAME.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ same_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
struct ip_conntrack *ct;
enum ip_conntrack_info ctinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_TCPMSS.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
struct tcphdr *tcph;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv4/netfilter/ipt_TOS.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ipt_tos_target_info *tosinfo = targinfo;
struct iphdr *iph = (*pskb)->nh.iph;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_TTL.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static unsigned int
ipt_ttl_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *out,
unsigned int hooknum, const struct xt_target *target,
const void *targinfo, void *userinfo)
const void *targinfo)
{
struct iphdr *iph;
const struct ipt_TTL_info *info = targinfo;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_ULOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, void *userinfo)
const void *targinfo)
{
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;

Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/iptable_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ipt_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
return ipt_do_table(pskb, hook, in, out, &packet_filter);
}

static unsigned int
Expand All @@ -108,7 +108,7 @@ ipt_local_out_hook(unsigned int hook,
return NF_ACCEPT;
}

return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
return ipt_do_table(pskb, hook, in, out, &packet_filter);
}

static struct nf_hook_ops ipt_ops[] = {
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/iptable_mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ipt_route_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
return ipt_do_table(pskb, hook, in, out, &packet_mangler);
}

static unsigned int
Expand Down Expand Up @@ -148,7 +148,7 @@ ipt_local_hook(unsigned int hook,
daddr = (*pskb)->nh.iph->daddr;
tos = (*pskb)->nh.iph->tos;

ret = ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
ret = ipt_do_table(pskb, hook, in, out, &packet_mangler);
/* Reroute for ANY change. */
if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
&& ((*pskb)->nh.iph->saddr != saddr
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/iptable_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ipt_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return ipt_do_table(pskb, hook, in, out, &packet_raw, NULL);
return ipt_do_table(pskb, hook, in, out, &packet_raw);
}

/* 'raw' is the very first table. */
Expand Down
9 changes: 3 additions & 6 deletions net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ ip6t_error(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
if (net_ratelimit())
printk("ip6_tables: error: `%s'\n", (char *)targinfo);
Expand Down Expand Up @@ -258,8 +257,7 @@ ip6t_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct xt_table *table,
void *userdata)
struct xt_table *table)
{
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
int offset = 0;
Expand Down Expand Up @@ -349,8 +347,7 @@ ip6t_do_table(struct sk_buff **pskb,
in, out,
hook,
t->u.kernel.target,
t->data,
userdata);
t->data);

#ifdef CONFIG_NETFILTER_DEBUG
if (((struct ip6t_entry *)table_base)->comefrom
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_HL.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, void *userinfo)
const void *targinfo)
{
struct ipv6hdr *ip6h;
const struct ip6t_HL_info *info = targinfo;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv6/netfilter/ip6t_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ ip6t_log_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ip6t_log_info *loginfo = targinfo;
struct nf_loginfo li;
Expand Down
3 changes: 1 addition & 2 deletions net/ipv6/netfilter/ip6t_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ static unsigned int reject6_target(struct sk_buff **pskb,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *target,
const void *targinfo,
void *userinfo)
const void *targinfo)
{
const struct ip6t_reject_info *reject = targinfo;

Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/netfilter/ip6table_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ip6t_hook(unsigned int hook,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
}

static unsigned int
Expand All @@ -128,7 +128,7 @@ ip6t_local_out_hook(unsigned int hook,
}
#endif

return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
}

static struct nf_hook_ops ip6t_ops[] = {
Expand Down
Loading

0 comments on commit fe1cb10

Please sign in to comment.