Commit efa74165 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: x_tables: remove unused size argument to check/destroy functions

The size is verified by x_tables and isn't needed by the modules anymore.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe1cb108
...@@ -174,12 +174,10 @@ struct xt_match ...@@ -174,12 +174,10 @@ struct xt_match
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask); unsigned int hook_mask);
/* Called when entry of this type deleted. */ /* Called when entry of this type deleted. */
void (*destroy)(const struct xt_match *match, void *matchinfo, void (*destroy)(const struct xt_match *match, void *matchinfo);
unsigned int matchinfosize);
/* Called when userspace align differs from kernel space one */ /* Called when userspace align differs from kernel space one */
int (*compat)(void *match, void **dstptr, int *size, int convert); int (*compat)(void *match, void **dstptr, int *size, int convert);
...@@ -221,12 +219,10 @@ struct xt_target ...@@ -221,12 +219,10 @@ struct xt_target
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask); unsigned int hook_mask);
/* Called when entry of this type deleted. */ /* Called when entry of this type deleted. */
void (*destroy)(const struct xt_target *target, void *targinfo, void (*destroy)(const struct xt_target *target, void *targinfo);
unsigned int targinfosize);
/* Called when userspace align differs from kernel space one */ /* Called when userspace align differs from kernel space one */
int (*compat)(void *target, void **dstptr, int *size, int convert); int (*compat)(void *target, void **dstptr, int *size, int convert);
......
...@@ -491,8 +491,6 @@ static inline int check_entry(struct arpt_entry *e, const char *name, unsigned i ...@@ -491,8 +491,6 @@ static inline int check_entry(struct arpt_entry *e, const char *name, unsigned i
} }
} else if (t->u.kernel.target->checkentry } else if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, e, target, t->data, && !t->u.kernel.target->checkentry(name, e, target, t->data,
t->u.target_size
- sizeof(*t),
e->comefrom)) { e->comefrom)) {
duprintf("arp_tables: check failed for `%s'.\n", duprintf("arp_tables: check failed for `%s'.\n",
t->u.kernel.target->name); t->u.kernel.target->name);
...@@ -559,8 +557,7 @@ static inline int cleanup_entry(struct arpt_entry *e, unsigned int *i) ...@@ -559,8 +557,7 @@ static inline int cleanup_entry(struct arpt_entry *e, unsigned int *i)
t = arpt_get_target(e); t = arpt_get_target(e);
if (t->u.kernel.target->destroy) if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data, t->u.kernel.target->destroy(t->u.kernel.target, t->data);
t->u.target_size - sizeof(*t));
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
return 0; return 0;
} }
......
...@@ -67,7 +67,7 @@ target(struct sk_buff **pskb, ...@@ -67,7 +67,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, const void *e, const struct xt_target *target, checkentry(const char *tablename, const void *e, const struct xt_target *target,
void *targinfo, unsigned int targinfosize, unsigned int hook_mask) void *targinfo, unsigned int hook_mask)
{ {
const struct arpt_mangle *mangle = targinfo; const struct arpt_mangle *mangle = targinfo;
......
...@@ -172,7 +172,6 @@ static int ipt_snat_checkentry(const char *tablename, ...@@ -172,7 +172,6 @@ static int ipt_snat_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct ipt_target *target, const struct ipt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ip_nat_multi_range_compat *mr = targinfo; struct ip_nat_multi_range_compat *mr = targinfo;
...@@ -189,7 +188,6 @@ static int ipt_dnat_checkentry(const char *tablename, ...@@ -189,7 +188,6 @@ static int ipt_dnat_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct ipt_target *target, const struct ipt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ip_nat_multi_range_compat *mr = targinfo; struct ip_nat_multi_range_compat *mr = targinfo;
......
...@@ -464,8 +464,7 @@ cleanup_match(struct ipt_entry_match *m, unsigned int *i) ...@@ -464,8 +464,7 @@ cleanup_match(struct ipt_entry_match *m, unsigned int *i)
return 1; return 1;
if (m->u.kernel.match->destroy) if (m->u.kernel.match->destroy)
m->u.kernel.match->destroy(m->u.kernel.match, m->data, m->u.kernel.match->destroy(m->u.kernel.match, m->data);
m->u.match_size - sizeof(*m));
module_put(m->u.kernel.match->me); module_put(m->u.kernel.match->me);
return 0; return 0;
} }
...@@ -518,7 +517,6 @@ check_match(struct ipt_entry_match *m, ...@@ -518,7 +517,6 @@ check_match(struct ipt_entry_match *m,
if (m->u.kernel.match->checkentry if (m->u.kernel.match->checkentry
&& !m->u.kernel.match->checkentry(name, ip, match, m->data, && !m->u.kernel.match->checkentry(name, ip, match, m->data,
m->u.match_size - sizeof(*m),
hookmask)) { hookmask)) {
duprintf("ip_tables: check failed for `%s'.\n", duprintf("ip_tables: check failed for `%s'.\n",
m->u.kernel.match->name); m->u.kernel.match->name);
...@@ -579,8 +577,6 @@ check_entry(struct ipt_entry *e, const char *name, unsigned int size, ...@@ -579,8 +577,6 @@ check_entry(struct ipt_entry *e, const char *name, unsigned int size,
} }
} else if (t->u.kernel.target->checkentry } else if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, e, target, t->data, && !t->u.kernel.target->checkentry(name, e, target, t->data,
t->u.target_size
- sizeof(*t),
e->comefrom)) { e->comefrom)) {
duprintf("ip_tables: check failed for `%s'.\n", duprintf("ip_tables: check failed for `%s'.\n",
t->u.kernel.target->name); t->u.kernel.target->name);
...@@ -652,8 +648,7 @@ cleanup_entry(struct ipt_entry *e, unsigned int *i) ...@@ -652,8 +648,7 @@ cleanup_entry(struct ipt_entry *e, unsigned int *i)
IPT_MATCH_ITERATE(e, cleanup_match, NULL); IPT_MATCH_ITERATE(e, cleanup_match, NULL);
t = ipt_get_target(e); t = ipt_get_target(e);
if (t->u.kernel.target->destroy) if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data, t->u.kernel.target->destroy(t->u.kernel.target, t->data);
t->u.target_size - sizeof(*t));
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
return 0; return 0;
} }
...@@ -1599,7 +1594,6 @@ static inline int compat_copy_match_from_user(struct ipt_entry_match *m, ...@@ -1599,7 +1594,6 @@ static inline int compat_copy_match_from_user(struct ipt_entry_match *m,
if (m->u.kernel.match->checkentry if (m->u.kernel.match->checkentry
&& !m->u.kernel.match->checkentry(name, ip, match, dm->data, && !m->u.kernel.match->checkentry(name, ip, match, dm->data,
dm->u.match_size - sizeof(*dm),
hookmask)) { hookmask)) {
duprintf("ip_tables: check failed for `%s'.\n", duprintf("ip_tables: check failed for `%s'.\n",
m->u.kernel.match->name); m->u.kernel.match->name);
...@@ -1658,8 +1652,7 @@ static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr, ...@@ -1658,8 +1652,7 @@ static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr,
goto out; goto out;
} else if (t->u.kernel.target->checkentry } else if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, de, target, && !t->u.kernel.target->checkentry(name, de, target,
t->data, t->u.target_size - sizeof(*t), t->data, de->comefrom)) {
de->comefrom)) {
duprintf("ip_tables: compat: check failed for `%s'.\n", duprintf("ip_tables: compat: check failed for `%s'.\n",
t->u.kernel.target->name); t->u.kernel.target->name);
goto out; goto out;
...@@ -2182,7 +2175,6 @@ icmp_checkentry(const char *tablename, ...@@ -2182,7 +2175,6 @@ icmp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_icmp *icmpinfo = matchinfo; const struct ipt_icmp *icmpinfo = matchinfo;
......
...@@ -372,7 +372,6 @@ checkentry(const char *tablename, ...@@ -372,7 +372,6 @@ checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ipt_clusterip_tgt_info *cipinfo = targinfo; struct ipt_clusterip_tgt_info *cipinfo = targinfo;
...@@ -449,8 +448,7 @@ checkentry(const char *tablename, ...@@ -449,8 +448,7 @@ checkentry(const char *tablename,
} }
/* drop reference count of cluster config when rule is deleted */ /* drop reference count of cluster config when rule is deleted */
static void destroy(const struct xt_target *target, void *targinfo, static void destroy(const struct xt_target *target, void *targinfo)
unsigned int targinfosize)
{ {
struct ipt_clusterip_tgt_info *cipinfo = targinfo; struct ipt_clusterip_tgt_info *cipinfo = targinfo;
......
...@@ -106,7 +106,6 @@ checkentry(const char *tablename, ...@@ -106,7 +106,6 @@ checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_ECN_info *einfo = (struct ipt_ECN_info *)targinfo; const struct ipt_ECN_info *einfo = (struct ipt_ECN_info *)targinfo;
......
...@@ -439,7 +439,6 @@ static int ipt_log_checkentry(const char *tablename, ...@@ -439,7 +439,6 @@ static int ipt_log_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_log_info *loginfo = targinfo; const struct ipt_log_info *loginfo = targinfo;
......
...@@ -42,7 +42,6 @@ masquerade_check(const char *tablename, ...@@ -42,7 +42,6 @@ masquerade_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip_nat_multi_range_compat *mr = targinfo; const struct ip_nat_multi_range_compat *mr = targinfo;
......
...@@ -33,7 +33,6 @@ check(const char *tablename, ...@@ -33,7 +33,6 @@ check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip_nat_multi_range_compat *mr = targinfo; const struct ip_nat_multi_range_compat *mr = targinfo;
......
...@@ -36,7 +36,6 @@ redirect_check(const char *tablename, ...@@ -36,7 +36,6 @@ redirect_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip_nat_multi_range_compat *mr = targinfo; const struct ip_nat_multi_range_compat *mr = targinfo;
......
...@@ -276,7 +276,6 @@ static int check(const char *tablename, ...@@ -276,7 +276,6 @@ static int check(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_reject_info *rejinfo = targinfo; const struct ipt_reject_info *rejinfo = targinfo;
......
...@@ -52,7 +52,6 @@ same_check(const char *tablename, ...@@ -52,7 +52,6 @@ same_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
unsigned int count, countess, rangeip, index = 0; unsigned int count, countess, rangeip, index = 0;
...@@ -116,8 +115,7 @@ same_check(const char *tablename, ...@@ -116,8 +115,7 @@ same_check(const char *tablename,
} }
static void static void
same_destroy(const struct xt_target *target, void *targinfo, same_destroy(const struct xt_target *target, void *targinfo)
unsigned int targinfosize)
{ {
struct ipt_same_info *mr = targinfo; struct ipt_same_info *mr = targinfo;
......
...@@ -207,7 +207,6 @@ ipt_tcpmss_checkentry(const char *tablename, ...@@ -207,7 +207,6 @@ ipt_tcpmss_checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_tcpmss_info *tcpmssinfo = targinfo; const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
......
...@@ -49,7 +49,6 @@ checkentry(const char *tablename, ...@@ -49,7 +49,6 @@ checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const u_int8_t tos = ((struct ipt_tos_target_info *)targinfo)->tos; const u_int8_t tos = ((struct ipt_tos_target_info *)targinfo)->tos;
......
...@@ -67,7 +67,6 @@ static int ipt_ttl_checkentry(const char *tablename, ...@@ -67,7 +67,6 @@ static int ipt_ttl_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ipt_TTL_info *info = targinfo; struct ipt_TTL_info *info = targinfo;
......
...@@ -346,7 +346,6 @@ static int ipt_ulog_checkentry(const char *tablename, ...@@ -346,7 +346,6 @@ static int ipt_ulog_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hookmask) unsigned int hookmask)
{ {
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo; struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
......
...@@ -74,7 +74,6 @@ checkentry(const char *tablename, ...@@ -74,7 +74,6 @@ checkentry(const char *tablename,
const void *ip_void, const void *ip_void,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_ah *ahinfo = matchinfo; const struct ipt_ah *ahinfo = matchinfo;
......
...@@ -88,8 +88,7 @@ static int match(const struct sk_buff *skb, ...@@ -88,8 +88,7 @@ static int match(const struct sk_buff *skb,
static int checkentry(const char *tablename, const void *ip_void, static int checkentry(const char *tablename, const void *ip_void,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, unsigned int matchsize, void *matchinfo, unsigned int hook_mask)
unsigned int hook_mask)
{ {
const struct ipt_ecn_info *info = matchinfo; const struct ipt_ecn_info *info = matchinfo;
const struct ipt_ip *ip = ip_void; const struct ipt_ip *ip = ip_void;
......
...@@ -478,7 +478,6 @@ hashlimit_checkentry(const char *tablename, ...@@ -478,7 +478,6 @@ hashlimit_checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ipt_hashlimit_info *r = matchinfo; struct ipt_hashlimit_info *r = matchinfo;
...@@ -529,8 +528,7 @@ hashlimit_checkentry(const char *tablename, ...@@ -529,8 +528,7 @@ hashlimit_checkentry(const char *tablename,
} }
static void static void
hashlimit_destroy(const struct xt_match *match, void *matchinfo, hashlimit_destroy(const struct xt_match *match, void *matchinfo)
unsigned int matchsize)
{ {
struct ipt_hashlimit_info *r = matchinfo; struct ipt_hashlimit_info *r = matchinfo;
......
...@@ -56,7 +56,6 @@ checkentry(const char *tablename, ...@@ -56,7 +56,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_owner_info *info = matchinfo; const struct ipt_owner_info *info = matchinfo;
......
...@@ -238,7 +238,7 @@ ipt_recent_match(const struct sk_buff *skb, ...@@ -238,7 +238,7 @@ ipt_recent_match(const struct sk_buff *skb,
static int static int
ipt_recent_checkentry(const char *tablename, const void *ip, ipt_recent_checkentry(const char *tablename, const void *ip,
const struct xt_match *match, void *matchinfo, const struct xt_match *match, void *matchinfo,
unsigned int matchsize, unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_recent_info *info = matchinfo; const struct ipt_recent_info *info = matchinfo;
struct recent_table *t; struct recent_table *t;
...@@ -294,8 +294,7 @@ ipt_recent_checkentry(const char *tablename, const void *ip, ...@@ -294,8 +294,7 @@ ipt_recent_checkentry(const char *tablename, const void *ip,
} }
static void static void
ipt_recent_destroy(const struct xt_match *match, void *matchinfo, ipt_recent_destroy(const struct xt_match *match, void *matchinfo)
unsigned int matchsize)
{ {
const struct ipt_recent_info *info = matchinfo; const struct ipt_recent_info *info = matchinfo;
struct recent_table *t; struct recent_table *t;
......
...@@ -504,8 +504,7 @@ cleanup_match(struct ip6t_entry_match *m, unsigned int *i) ...@@ -504,8 +504,7 @@ cleanup_match(struct ip6t_entry_match *m, unsigned int *i)
return 1; return 1;
if (m->u.kernel.match->destroy) if (m->u.kernel.match->destroy)
m->u.kernel.match->destroy(m->u.kernel.match, m->data, m->u.kernel.match->destroy(m->u.kernel.match, m->data);
m->u.match_size - sizeof(*m));
module_put(m->u.kernel.match->me); module_put(m->u.kernel.match->me);
return 0; return 0;
} }
...@@ -558,7 +557,6 @@ check_match(struct ip6t_entry_match *m, ...@@ -558,7 +557,6 @@ check_match(struct ip6t_entry_match *m,
if (m->u.kernel.match->checkentry if (m->u.kernel.match->checkentry
&& !m->u.kernel.match->checkentry(name, ipv6, match, m->data, && !m->u.kernel.match->checkentry(name, ipv6, match, m->data,
m->u.match_size - sizeof(*m),
hookmask)) { hookmask)) {
duprintf("ip_tables: check failed for `%s'.\n", duprintf("ip_tables: check failed for `%s'.\n",
m->u.kernel.match->name); m->u.kernel.match->name);
...@@ -619,8 +617,6 @@ check_entry(struct ip6t_entry *e, const char *name, unsigned int size, ...@@ -619,8 +617,6 @@ check_entry(struct ip6t_entry *e, const char *name, unsigned int size,
} }
} else if (t->u.kernel.target->checkentry } else if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, e, target, t->data, && !t->u.kernel.target->checkentry(name, e, target, t->data,
t->u.target_size
- sizeof(*t),
e->comefrom)) { e->comefrom)) {
duprintf("ip_tables: check failed for `%s'.\n", duprintf("ip_tables: check failed for `%s'.\n",
t->u.kernel.target->name); t->u.kernel.target->name);
...@@ -692,8 +688,7 @@ cleanup_entry(struct ip6t_entry *e, unsigned int *i) ...@@ -692,8 +688,7 @@ cleanup_entry(struct ip6t_entry *e, unsigned int *i)
IP6T_MATCH_ITERATE(e, cleanup_match, NULL); IP6T_MATCH_ITERATE(e, cleanup_match, NULL);
t = ip6t_get_target(e); t = ip6t_get_target(e);
if (t->u.kernel.target->destroy) if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data, t->u.kernel.target->destroy(t->u.kernel.target, t->data);
t->u.target_size - sizeof(*t));
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
return 0; return 0;
} }
...@@ -1349,7 +1344,6 @@ icmp6_checkentry(const char *tablename, ...@@ -1349,7 +1344,6 @@ icmp6_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_icmp *icmpinfo = matchinfo; const struct ip6t_icmp *icmpinfo = matchinfo;
......
...@@ -66,7 +66,6 @@ static int ip6t_hl_checkentry(const char *tablename, ...@@ -66,7 +66,6 @@ static int ip6t_hl_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct ip6t_HL_info *info = targinfo; struct ip6t_HL_info *info = targinfo;
......
...@@ -451,7 +451,6 @@ static int ip6t_log_checkentry(const char *tablename, ...@@ -451,7 +451,6 @@ static int ip6t_log_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_log_info *loginfo = targinfo; const struct ip6t_log_info *loginfo = targinfo;
......
...@@ -223,7 +223,6 @@ static int check(const char *tablename, ...@@ -223,7 +223,6 @@ static int check(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_reject_info *rejinfo = targinfo; const struct ip6t_reject_info *rejinfo = targinfo;
......
...@@ -102,7 +102,6 @@ checkentry(const char *tablename, ...@@ -102,7 +102,6 @@ checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_ah *ahinfo = matchinfo; const struct ip6t_ah *ahinfo = matchinfo;
......
...@@ -182,7 +182,6 @@ checkentry(const char *tablename, ...@@ -182,7 +182,6 @@ checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_opts *optsinfo = matchinfo; const struct ip6t_opts *optsinfo = matchinfo;
......
...@@ -119,7 +119,6 @@ checkentry(const char *tablename, ...@@ -119,7 +119,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_frag *fraginfo = matchinfo; const struct ip6t_frag *fraginfo = matchinfo;
......
...@@ -182,7 +182,6 @@ checkentry(const char *tablename, ...@@ -182,7 +182,6 @@ checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_opts *optsinfo = matchinfo; const struct ip6t_opts *optsinfo = matchinfo;
......
...@@ -128,7 +128,6 @@ ipv6header_checkentry(const char *tablename, ...@@ -128,7 +128,6 @@ ipv6header_checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_ipv6header_info *info = matchinfo; const struct ip6t_ipv6header_info *info = matchinfo;
......
...@@ -57,7 +57,6 @@ checkentry(const char *tablename, ...@@ -57,7 +57,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_owner_info *info = matchinfo; const struct ip6t_owner_info *info = matchinfo;
......
...@@ -197,7 +197,6 @@ checkentry(const char *tablename, ...@@ -197,7 +197,6 @@ checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_rt *rtinfo = matchinfo; const struct ip6t_rt *rtinfo = matchinfo;
......
...@@ -89,7 +89,6 @@ checkentry(const char *tablename, ...@@ -89,7 +89,6 @@ checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_connmark_target_info *matchinfo = targinfo; struct xt_connmark_target_info *matchinfo = targinfo;
......
...@@ -89,7 +89,7 @@ static unsigned int target(struct sk_buff **pskb, const struct net_device *in, ...@@ -89,7 +89,7 @@ static unsigned int target(struct sk_buff **pskb, const struct net_device *in,
static int checkentry(const char *tablename, const void *entry, static int checkentry(const char *tablename, const void *entry,
const struct xt_target *target, void *targinfo, const struct xt_target *target, void *targinfo,
unsigned int targinfosize, unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_connsecmark_target_info *info = targinfo; struct xt_connsecmark_target_info *info = targinfo;
......
...@@ -72,7 +72,6 @@ static int checkentry(const char *tablename, ...@@ -72,7 +72,6 @@ static int checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const u_int8_t dscp = ((struct xt_DSCP_info *)targinfo)->dscp; const u_int8_t dscp = ((struct xt_DSCP_info *)targinfo)->dscp;
......
...@@ -74,7 +74,6 @@ checkentry_v0(const char *tablename, ...@@ -74,7 +74,6 @@ checkentry_v0(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_mark_target_info *markinfo = targinfo; struct xt_mark_target_info *markinfo = targinfo;
...@@ -91,7 +90,6 @@ checkentry_v1(const char *tablename, ...@@ -91,7 +90,6 @@ checkentry_v1(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target, const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_mark_target_info_v1 *markinfo = targinfo; struct xt_mark_target_info_v1 *markinfo = targinfo;
......
...@@ -85,7 +85,7 @@ static int checkentry_selinux(struct xt_secmark_target_info *info) ...@@ -85,7 +85,7 @@ static int checkentry_selinux(struct xt_secmark_target_info *info)
static int checkentry(const char *tablename, const void *entry, static int checkentry(const char *tablename, const void *entry,
const struct xt_target *target, void *targinfo, const struct xt_target *target, void *targinfo,
unsigned int targinfosize, unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_secmark_target_info *info = targinfo; struct xt_secmark_target_info *info = targinfo;
......
...@@ -125,7 +125,6 @@ static int check(const char *tablename, ...@@ -125,7 +125,6 @@ static int check(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_connbytes_info *sinfo = matchinfo; const struct xt_connbytes_info *sinfo = matchinfo;
......
...@@ -55,7 +55,6 @@ checkentry(const char *tablename, ...@@ -55,7 +55,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_connmark_info *cm = matchinfo; struct xt_connmark_info *cm = matchinfo;
...@@ -75,7 +74,7 @@ checkentry(const char *tablename, ...@@ -75,7 +74,7 @@ checkentry(const char *tablename,
} }
static void static void
destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) destroy(const struct xt_match *match, void *matchinfo)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
......
...@@ -208,7 +208,6 @@ checkentry(const char *tablename, ...@@ -208,7 +208,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
...@@ -222,7 +221,7 @@ checkentry(const char *tablename, ...@@ -222,7 +221,7 @@ checkentry(const char *tablename,
} }
static void static void
destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) destroy(const struct xt_match *match, void *matchinfo)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
......
...@@ -131,7 +131,6 @@ checkentry(const char *tablename, ...@@ -131,7 +131,6 @@ checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_dccp_info *info = matchinfo; const struct xt_dccp_info *info = matchinfo;
......
...@@ -58,7 +58,6 @@ static int checkentry(const char *tablename, ...@@ -58,7 +58,6 @@ static int checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const u_int8_t dscp = ((struct xt_dscp_info *)matchinfo)->dscp; const u_int8_t dscp = ((struct xt_dscp_info *)matchinfo)->dscp;
......
...@@ -79,7 +79,6 @@ checkentry(const char *tablename, ...@@ -79,7 +79,6 @@ checkentry(const char *tablename,
const void *ip_void, const void *ip_void,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_esp *espinfo = matchinfo; const struct xt_esp *espinfo = matchinfo;
......
...@@ -139,7 +139,6 @@ static int check(const char *tablename, ...@@ -139,7 +139,6 @@ static int check(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_helper_info *info = matchinfo; struct xt_helper_info *info = matchinfo;
...@@ -156,7 +155,7 @@ static int check(const char *tablename, ...@@ -156,7 +155,7 @@ static int check(const char *tablename,
} }
static void static void
destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) destroy(const struct xt_match *match, void *matchinfo)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
......
...@@ -110,7 +110,6 @@ ipt_limit_checkentry(const char *tablename, ...@@ -110,7 +110,6 @@ ipt_limit_checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_rateinfo *r = matchinfo; struct xt_rateinfo *r = matchinfo;
......
...@@ -39,7 +39,6 @@ checkentry(const char *tablename, ...@@ -39,7 +39,6 @@ checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_mark_info *minfo = matchinfo; const struct xt_mark_info *minfo = matchinfo;
......
...@@ -176,7 +176,6 @@ checkentry(const char *tablename, ...@@ -176,7 +176,6 @@ checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_ip *ip = info; const struct ipt_ip *ip = info;
...@@ -191,7 +190,6 @@ checkentry_v1(const char *tablename, ...@@ -191,7 +190,6 @@ checkentry_v1(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ipt_ip *ip = info; const struct ipt_ip *ip = info;
...@@ -206,7 +204,6 @@ checkentry6(const char *tablename, ...@@ -206,7 +204,6 @@ checkentry6(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_ip6 *ip = info; const struct ip6t_ip6 *ip = info;
...@@ -221,7 +218,6 @@ checkentry6_v1(const char *tablename, ...@@ -221,7 +218,6 @@ checkentry6_v1(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct ip6t_ip6 *ip = info; const struct ip6t_ip6 *ip = info;
......
...@@ -106,7 +106,6 @@ checkentry(const char *tablename, ...@@ -106,7 +106,6 @@ checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_physdev_info *info = matchinfo; const struct xt_physdev_info *info = matchinfo;
......
...@@ -135,8 +135,7 @@ static int match(const struct sk_buff *skb, ...@@ -135,8 +135,7 @@ static int match(const struct sk_buff *skb,
static int checkentry(const char *tablename, const void *ip_void, static int checkentry(const char *tablename, const void *ip_void,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, unsigned int matchsize, void *matchinfo, unsigned int hook_mask)
unsigned int hook_mask)
{ {
struct xt_policy_info *info = matchinfo; struct xt_policy_info *info = matchinfo;
......
...@@ -41,7 +41,7 @@ match(const struct sk_buff *skb, ...@@ -41,7 +41,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, const void *entry, checkentry(const char *tablename, const void *entry,
const struct xt_match *match, void *matchinfo, const struct xt_match *match, void *matchinfo,
unsigned int matchsize, unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_quota_info *q = (struct xt_quota_info *)matchinfo; struct xt_quota_info *q = (struct xt_quota_info *)matchinfo;
......
...@@ -163,7 +163,6 @@ checkentry(const char *tablename, ...@@ -163,7 +163,6 @@ checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_sctp_info *info = matchinfo; const struct xt_sctp_info *info = matchinfo;
......
...@@ -48,7 +48,6 @@ static int check(const char *tablename, ...@@ -48,7 +48,6 @@ static int check(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
...@@ -62,7 +61,7 @@ static int check(const char *tablename, ...@@ -62,7 +61,7 @@ static int check(const char *tablename,
} }
static void static void
destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) destroy(const struct xt_match *match, void *matchinfo)
{ {
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
......
...@@ -55,7 +55,7 @@ match(const struct sk_buff *skb, ...@@ -55,7 +55,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, const void *entry, checkentry(const char *tablename, const void *entry,
const struct xt_match *match, void *matchinfo, const struct xt_match *match, void *matchinfo,
unsigned int matchsize, unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo; struct xt_statistic_info *info = (struct xt_statistic_info *)matchinfo;
......
...@@ -46,7 +46,6 @@ static int checkentry(const char *tablename, ...@@ -46,7 +46,6 @@ static int checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
struct xt_string_info *conf = matchinfo; struct xt_string_info *conf = matchinfo;
...@@ -69,8 +68,7 @@ static int checkentry(const char *tablename, ...@@ -69,8 +68,7 @@ static int checkentry(const char *tablename,
return 1; return 1;
} }
static void destroy(const struct xt_match *match, void *matchinfo, static void destroy(const struct xt_match *match, void *matchinfo)
unsigned int matchsize)
{ {
textsearch_destroy(STRING_TEXT_PRIV(matchinfo)->config); textsearch_destroy(STRING_TEXT_PRIV(matchinfo)->config);
} }
......
...@@ -141,7 +141,6 @@ tcp_checkentry(const char *tablename, ...@@ -141,7 +141,6 @@ tcp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_tcp *tcpinfo = matchinfo; const struct xt_tcp *tcpinfo = matchinfo;
...@@ -190,7 +189,6 @@ udp_checkentry(const char *tablename, ...@@ -190,7 +189,6 @@ udp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match, const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
const struct xt_tcp *udpinfo = matchinfo; const struct xt_tcp *udpinfo = matchinfo;
......
...@@ -69,7 +69,6 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int ...@@ -69,7 +69,6 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
if (t->u.kernel.target->checkentry if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(table, NULL, && !t->u.kernel.target->checkentry(table, NULL,
t->u.kernel.target, t->data, t->u.kernel.target, t->data,
t->u.target_size - sizeof(*t),
hook)) { hook)) {
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
ret = -EINVAL; ret = -EINVAL;
...@@ -81,8 +80,7 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int ...@@ -81,8 +80,7 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
static void ipt_destroy_target(struct ipt_entry_target *t) static void ipt_destroy_target(struct ipt_entry_target *t)
{ {
if (t->u.kernel.target->destroy) if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data, t->u.kernel.target->destroy(t->u.kernel.target, t->data);
t->u.target_size - sizeof(*t));
module_put(t->u.kernel.target->me); module_put(t->u.kernel.target->me);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment