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

[NETFILTER]: x_tables: add xt_{match,target} arguments to match/target functions

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c524830
...@@ -208,6 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb, ...@@ -208,6 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -8,9 +8,10 @@ MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>"); ...@@ -8,9 +8,10 @@ MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
MODULE_DESCRIPTION("arptables arp payload mangle target"); MODULE_DESCRIPTION("arptables arp payload mangle target");
static unsigned int static unsigned int
target(struct sk_buff **pskb, const struct net_device *in, target(struct sk_buff **pskb,
const struct net_device *out, unsigned int hooknum, const void *targinfo, const struct net_device *in, const struct net_device *out,
void *userinfo) unsigned int hooknum, const struct xt_target *target,
const void *targinfo, void *userinfo)
{ {
const struct arpt_mangle *mangle = targinfo; const struct arpt_mangle *mangle = targinfo;
struct arphdr *arp; struct arphdr *arp;
...@@ -65,8 +66,8 @@ target(struct sk_buff **pskb, const struct net_device *in, ...@@ -65,8 +66,8 @@ target(struct sk_buff **pskb, const struct net_device *in,
} }
static int static int
checkentry(const char *tablename, const void *e, void *targinfo, checkentry(const char *tablename, const void *e, const struct xt_target *target,
unsigned int targinfosize, unsigned int hook_mask) void *targinfo, unsigned int targinfosize, unsigned int hook_mask)
{ {
const struct arpt_mangle *mangle = targinfo; const struct arpt_mangle *mangle = targinfo;
......
...@@ -103,6 +103,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb, ...@@ -103,6 +103,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct ipt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -145,6 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb, ...@@ -145,6 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct ipt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -170,6 +172,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb, ...@@ -170,6 +172,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
static int ipt_snat_checkentry(const char *tablename, static int ipt_snat_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct ipt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -186,6 +189,7 @@ static int ipt_snat_checkentry(const char *tablename, ...@@ -186,6 +189,7 @@ static int ipt_snat_checkentry(const char *tablename,
static int ipt_dnat_checkentry(const char *tablename, static int ipt_dnat_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct ipt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -179,6 +179,7 @@ ipt_error(struct sk_buff **pskb, ...@@ -179,6 +179,7 @@ ipt_error(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -1285,6 +1286,7 @@ static int ...@@ -1285,6 +1286,7 @@ static int
icmp_match(const struct sk_buff *skb, icmp_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -1318,6 +1320,7 @@ icmp_match(const struct sk_buff *skb, ...@@ -1318,6 +1320,7 @@ icmp_match(const struct sk_buff *skb,
static int static int
icmp_checkentry(const char *tablename, icmp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -311,6 +311,7 @@ target(struct sk_buff **pskb, ...@@ -311,6 +311,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -380,6 +381,7 @@ target(struct sk_buff **pskb, ...@@ -380,6 +381,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -458,9 +460,10 @@ checkentry(const char *tablename, ...@@ -458,9 +460,10 @@ 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(void *matchinfo, unsigned int matchinfosize) static void destroy(const struct xt_target *target, void *targinfo,
unsigned int targinfosize)
{ {
struct ipt_clusterip_tgt_info *cipinfo = matchinfo; struct ipt_clusterip_tgt_info *cipinfo = targinfo;
/* if no more entries are referencing the config, remove it /* if no more entries are referencing the config, remove it
* from the list and destroy the proc entry */ * from the list and destroy the proc entry */
......
...@@ -29,6 +29,7 @@ target(struct sk_buff **pskb, ...@@ -29,6 +29,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -58,6 +59,7 @@ target(struct sk_buff **pskb, ...@@ -58,6 +59,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -94,6 +94,7 @@ target(struct sk_buff **pskb, ...@@ -94,6 +94,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -114,6 +115,7 @@ target(struct sk_buff **pskb, ...@@ -114,6 +115,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -415,6 +415,7 @@ ipt_log_target(struct sk_buff **pskb, ...@@ -415,6 +415,7 @@ ipt_log_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -437,6 +438,7 @@ ipt_log_target(struct sk_buff **pskb, ...@@ -437,6 +438,7 @@ ipt_log_target(struct sk_buff **pskb,
static int ipt_log_checkentry(const char *tablename, static int ipt_log_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -41,6 +41,7 @@ static DEFINE_RWLOCK(masq_lock); ...@@ -41,6 +41,7 @@ static DEFINE_RWLOCK(masq_lock);
static int static int
masquerade_check(const char *tablename, masquerade_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -63,6 +64,7 @@ masquerade_target(struct sk_buff **pskb, ...@@ -63,6 +64,7 @@ masquerade_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -32,6 +32,7 @@ MODULE_DESCRIPTION("iptables 1:1 NAT mapping of IP networks target"); ...@@ -32,6 +32,7 @@ MODULE_DESCRIPTION("iptables 1:1 NAT mapping of IP networks target");
static int static int
check(const char *tablename, check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -54,6 +55,7 @@ target(struct sk_buff **pskb, ...@@ -54,6 +55,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -34,6 +34,7 @@ MODULE_DESCRIPTION("iptables REDIRECT target module"); ...@@ -34,6 +34,7 @@ MODULE_DESCRIPTION("iptables REDIRECT target module");
static int static int
redirect_check(const char *tablename, redirect_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -56,6 +57,7 @@ redirect_target(struct sk_buff **pskb, ...@@ -56,6 +57,7 @@ redirect_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -236,6 +236,7 @@ static unsigned int reject(struct sk_buff **pskb, ...@@ -236,6 +236,7 @@ static unsigned int reject(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -283,6 +284,7 @@ static unsigned int reject(struct sk_buff **pskb, ...@@ -283,6 +284,7 @@ static unsigned int reject(struct sk_buff **pskb,
static int check(const char *tablename, static int check(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -50,6 +50,7 @@ MODULE_DESCRIPTION("iptables special SNAT module for consistent sourceip"); ...@@ -50,6 +50,7 @@ MODULE_DESCRIPTION("iptables special SNAT module for consistent sourceip");
static int static int
same_check(const char *tablename, same_check(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -115,7 +116,7 @@ same_check(const char *tablename, ...@@ -115,7 +116,7 @@ same_check(const char *tablename,
} }
static void static void
same_destroy(void *targinfo, same_destroy(const struct xt_target *target, void *targinfo,
unsigned int targinfosize) unsigned int targinfosize)
{ {
struct ipt_same_info *mr = targinfo; struct ipt_same_info *mr = targinfo;
...@@ -131,6 +132,7 @@ same_target(struct sk_buff **pskb, ...@@ -131,6 +132,7 @@ same_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -48,6 +48,7 @@ ipt_tcpmss_target(struct sk_buff **pskb, ...@@ -48,6 +48,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -211,6 +212,7 @@ static inline int find_syn_match(const struct ipt_entry_match *m) ...@@ -211,6 +212,7 @@ static inline int find_syn_match(const struct ipt_entry_match *m)
static int static int
ipt_tcpmss_checkentry(const char *tablename, ipt_tcpmss_checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -25,6 +25,7 @@ target(struct sk_buff **pskb, ...@@ -25,6 +25,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -53,6 +54,7 @@ target(struct sk_buff **pskb, ...@@ -53,6 +54,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *e_void, const void *e_void,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -20,8 +20,9 @@ MODULE_DESCRIPTION("IP tables TTL modification module"); ...@@ -20,8 +20,9 @@ MODULE_DESCRIPTION("IP tables TTL modification module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static unsigned int static unsigned int
ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in, ipt_ttl_target(struct sk_buff **pskb,
const struct net_device *out, unsigned int hooknum, 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, void *userinfo)
{ {
struct iphdr *iph; struct iphdr *iph;
...@@ -67,6 +68,7 @@ ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in, ...@@ -67,6 +68,7 @@ ipt_ttl_target(struct sk_buff **pskb, const struct net_device *in,
static int ipt_ttl_checkentry(const char *tablename, static int ipt_ttl_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -303,6 +303,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb, ...@@ -303,6 +303,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, void *userinfo) const void *targinfo, void *userinfo)
{ {
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo; struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
...@@ -339,6 +340,7 @@ static void ipt_logfn(unsigned int pf, ...@@ -339,6 +340,7 @@ static void ipt_logfn(unsigned int pf,
static int ipt_ulog_checkentry(const char *tablename, static int ipt_ulog_checkentry(const char *tablename,
const void *e, const void *e,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hookmask) unsigned int hookmask)
......
...@@ -27,8 +27,9 @@ static inline int match_type(u_int32_t addr, u_int16_t mask) ...@@ -27,8 +27,9 @@ static inline int match_type(u_int32_t addr, u_int16_t mask)
return !!(mask & (1 << inet_addr_type(addr))); return !!(mask & (1 << inet_addr_type(addr)));
} }
static int match(const struct sk_buff *skb, const struct net_device *in, static int match(const struct sk_buff *skb,
const struct net_device *out, const void *matchinfo, const struct net_device *in, const struct net_device *out,
const struct xt_match *match, const void *matchinfo,
int offset, unsigned int protoff, int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
const struct ipt_addrtype_info *info = matchinfo; const struct ipt_addrtype_info *info = matchinfo;
......
...@@ -39,6 +39,7 @@ static int ...@@ -39,6 +39,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -71,6 +72,7 @@ match(const struct sk_buff *skb, ...@@ -71,6 +72,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip_void, const void *ip_void,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); ...@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("iptables DSCP matching module"); MODULE_DESCRIPTION("iptables DSCP matching module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int match(const struct sk_buff *skb, const struct net_device *in, static int match(const struct sk_buff *skb,
const struct net_device *out, const void *matchinfo, const struct net_device *in, const struct net_device *out,
const struct xt_match *match, const void *matchinfo,
int offset, unsigned int protoff, int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
const struct ipt_dscp_info *info = matchinfo; const struct ipt_dscp_info *info = matchinfo;
......
...@@ -65,8 +65,9 @@ static inline int match_tcp(const struct sk_buff *skb, ...@@ -65,8 +65,9 @@ static inline int match_tcp(const struct sk_buff *skb,
return 1; return 1;
} }
static int match(const struct sk_buff *skb, const struct net_device *in, static int match(const struct sk_buff *skb,
const struct net_device *out, const void *matchinfo, const struct net_device *in, const struct net_device *out,
const struct xt_match *match, const void *matchinfo,
int offset, unsigned int protoff, int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
const struct ipt_ecn_info *info = matchinfo; 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,6 +87,7 @@ static int match(const struct sk_buff *skb, const struct net_device *in,
} }
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,
void *matchinfo, unsigned int matchsize, void *matchinfo, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
......
...@@ -40,6 +40,7 @@ static int ...@@ -40,6 +40,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -72,6 +73,7 @@ match(const struct sk_buff *skb, ...@@ -72,6 +73,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip_void, const void *ip_void,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -427,6 +427,7 @@ static int ...@@ -427,6 +427,7 @@ static int
hashlimit_match(const struct sk_buff *skb, hashlimit_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -506,6 +507,7 @@ hashlimit_match(const struct sk_buff *skb, ...@@ -506,6 +507,7 @@ hashlimit_match(const struct sk_buff *skb,
static int static int
hashlimit_checkentry(const char *tablename, hashlimit_checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -555,7 +557,8 @@ hashlimit_checkentry(const char *tablename, ...@@ -555,7 +557,8 @@ hashlimit_checkentry(const char *tablename,
} }
static void static void
hashlimit_destroy(void *matchinfo, unsigned int matchsize) hashlimit_destroy(const struct xt_match *match, void *matchinfo,
unsigned int matchsize)
{ {
struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo; struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo;
......
...@@ -27,6 +27,7 @@ static int ...@@ -27,6 +27,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, unsigned int protoff, int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
......
...@@ -95,6 +95,7 @@ static int ...@@ -95,6 +95,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -127,6 +128,7 @@ static int ...@@ -127,6 +128,7 @@ static int
match_v1(const struct sk_buff *skb, match_v1(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -25,6 +25,7 @@ static int ...@@ -25,6 +25,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -53,6 +54,7 @@ match(const struct sk_buff *skb, ...@@ -53,6 +54,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -98,6 +98,7 @@ match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info) ...@@ -98,6 +98,7 @@ match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info)
static int match(const struct sk_buff *skb, static int match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -120,6 +121,7 @@ static int match(const struct sk_buff *skb, ...@@ -120,6 +121,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,
void *matchinfo, unsigned int matchsize, void *matchinfo, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
{ {
......
...@@ -102,6 +102,7 @@ static int ...@@ -102,6 +102,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -318,7 +319,7 @@ static int ip_recent_ctrl(struct file *file, const char __user *input, unsigned ...@@ -318,7 +319,7 @@ static int ip_recent_ctrl(struct file *file, const char __user *input, unsigned
skb->nh.iph->daddr = 0; skb->nh.iph->daddr = 0;
/* Clear ttl since we have no way of knowing it */ /* Clear ttl since we have no way of knowing it */
skb->nh.iph->ttl = 0; skb->nh.iph->ttl = 0;
match(skb,NULL,NULL,info,0,0,NULL); match(skb,NULL,NULL,NULL,info,0,0,NULL);
kfree(skb->nh.iph); kfree(skb->nh.iph);
out_free_skb: out_free_skb:
...@@ -356,6 +357,7 @@ static int ...@@ -356,6 +357,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -657,6 +659,7 @@ match(const struct sk_buff *skb, ...@@ -657,6 +659,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -869,7 +872,7 @@ checkentry(const char *tablename, ...@@ -869,7 +872,7 @@ checkentry(const char *tablename,
* up its memory. * up its memory.
*/ */
static void static void
destroy(void *matchinfo, unsigned int matchsize) 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_ip_tables *curr_table, *last_table; struct recent_ip_tables *curr_table, *last_table;
......
...@@ -21,6 +21,7 @@ static int ...@@ -21,6 +21,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>"); ...@@ -19,8 +19,9 @@ MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("IP tables TTL matching module"); MODULE_DESCRIPTION("IP tables TTL matching module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int match(const struct sk_buff *skb, const struct net_device *in, static int match(const struct sk_buff *skb,
const struct net_device *out, const void *matchinfo, const struct net_device *in, const struct net_device *out,
const struct xt_match *match, const void *matchinfo,
int offset, unsigned int protoff, int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
const struct ipt_ttl_info *info = matchinfo; const struct ipt_ttl_info *info = matchinfo;
......
...@@ -232,6 +232,7 @@ ip6t_error(struct sk_buff **pskb, ...@@ -232,6 +232,7 @@ ip6t_error(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -1341,6 +1342,7 @@ static int ...@@ -1341,6 +1342,7 @@ static int
icmp6_match(const struct sk_buff *skb, icmp6_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -1373,6 +1375,7 @@ icmp6_match(const struct sk_buff *skb, ...@@ -1373,6 +1375,7 @@ icmp6_match(const struct sk_buff *skb,
static int static int
icmp6_checkentry(const char *tablename, icmp6_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -21,6 +21,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb, ...@@ -21,6 +21,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, void *userinfo) const void *targinfo, void *userinfo)
{ {
struct ipv6hdr *ip6h; struct ipv6hdr *ip6h;
...@@ -63,6 +64,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb, ...@@ -63,6 +64,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
static int ip6t_hl_checkentry(const char *tablename, static int ip6t_hl_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -426,6 +426,7 @@ ip6t_log_target(struct sk_buff **pskb, ...@@ -426,6 +426,7 @@ ip6t_log_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -449,6 +450,7 @@ ip6t_log_target(struct sk_buff **pskb, ...@@ -449,6 +450,7 @@ ip6t_log_target(struct sk_buff **pskb,
static int ip6t_log_checkentry(const char *tablename, static int ip6t_log_checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -179,6 +179,7 @@ static unsigned int reject6_target(struct sk_buff **pskb, ...@@ -179,6 +179,7 @@ static unsigned int reject6_target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -221,6 +222,7 @@ static unsigned int reject6_target(struct sk_buff **pskb, ...@@ -221,6 +222,7 @@ static unsigned int reject6_target(struct sk_buff **pskb,
static int check(const char *tablename, static int check(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -44,6 +44,7 @@ static int ...@@ -44,6 +44,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -99,6 +100,7 @@ match(const struct sk_buff *skb, ...@@ -99,6 +100,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -55,6 +55,7 @@ static int ...@@ -55,6 +55,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -179,6 +180,7 @@ match(const struct sk_buff *skb, ...@@ -179,6 +180,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -44,6 +44,7 @@ static int ...@@ -44,6 +44,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -77,6 +78,7 @@ match(const struct sk_buff *skb, ...@@ -77,6 +78,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -22,6 +22,7 @@ static int ...@@ -22,6 +22,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -43,6 +43,7 @@ static int ...@@ -43,6 +43,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -116,6 +117,7 @@ match(const struct sk_buff *skb, ...@@ -116,6 +117,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -55,6 +55,7 @@ static int ...@@ -55,6 +55,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -179,6 +180,7 @@ match(const struct sk_buff *skb, ...@@ -179,6 +180,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -18,10 +18,10 @@ MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>"); ...@@ -18,10 +18,10 @@ MODULE_AUTHOR("Maciej Soltysiak <solt@dns.toxicfilms.tv>");
MODULE_DESCRIPTION("IP tables Hop Limit matching module"); MODULE_DESCRIPTION("IP tables Hop Limit matching module");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static int match(const struct sk_buff *skb, const struct net_device *in, static int match(const struct sk_buff *skb,
const struct net_device *out, const void *matchinfo, const struct net_device *in, const struct net_device *out,
int offset, unsigned int protoff, const struct xt_match *match, const void *matchinfo,
int *hotdrop) int offset, unsigned int protoff, int *hotdrop)
{ {
const struct ip6t_hl_info *info = matchinfo; const struct ip6t_hl_info *info = matchinfo;
const struct ipv6hdr *ip6h = skb->nh.ipv6h; const struct ipv6hdr *ip6h = skb->nh.ipv6h;
......
...@@ -29,6 +29,7 @@ static int ...@@ -29,6 +29,7 @@ static int
ipv6header_match(const struct sk_buff *skb, ipv6header_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -125,6 +126,7 @@ ipv6header_match(const struct sk_buff *skb, ...@@ -125,6 +126,7 @@ ipv6header_match(const struct sk_buff *skb,
static int static int
ipv6header_checkentry(const char *tablename, ipv6header_checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -51,6 +51,7 @@ static int ...@@ -51,6 +51,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -85,6 +86,7 @@ match(const struct sk_buff *skb, ...@@ -85,6 +86,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -26,6 +26,7 @@ static int ...@@ -26,6 +26,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -54,6 +55,7 @@ match(const struct sk_buff *skb, ...@@ -54,6 +55,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -98,6 +98,7 @@ match_policy_out(const struct sk_buff *skb, const struct ip6t_policy_info *info) ...@@ -98,6 +98,7 @@ match_policy_out(const struct sk_buff *skb, const struct ip6t_policy_info *info)
static int match(const struct sk_buff *skb, static int match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -120,8 +121,8 @@ static int match(const struct sk_buff *skb, ...@@ -120,8 +121,8 @@ 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,
void *matchinfo, unsigned int matchsize, const struct xt_match *match, void *matchinfo,
unsigned int hook_mask) unsigned int matchsize, unsigned int hook_mask)
{ {
struct ip6t_policy_info *info = matchinfo; struct ip6t_policy_info *info = matchinfo;
......
...@@ -45,6 +45,7 @@ static int ...@@ -45,6 +45,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -194,6 +195,7 @@ match(const struct sk_buff *skb, ...@@ -194,6 +195,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchinfosize, unsigned int matchinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -28,6 +28,7 @@ target(struct sk_buff **pskb, ...@@ -28,6 +28,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -37,6 +37,7 @@ target(struct sk_buff **pskb, ...@@ -37,6 +37,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -74,6 +75,7 @@ target(struct sk_buff **pskb, ...@@ -74,6 +75,7 @@ target(struct sk_buff **pskb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -26,6 +26,7 @@ target_v0(struct sk_buff **pskb, ...@@ -26,6 +26,7 @@ target_v0(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -42,6 +43,7 @@ target_v1(struct sk_buff **pskb, ...@@ -42,6 +43,7 @@ target_v1(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
...@@ -72,6 +74,7 @@ target_v1(struct sk_buff **pskb, ...@@ -72,6 +74,7 @@ target_v1(struct sk_buff **pskb,
static int static int
checkentry_v0(const char *tablename, checkentry_v0(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -88,6 +91,7 @@ checkentry_v0(const char *tablename, ...@@ -88,6 +91,7 @@ checkentry_v0(const char *tablename,
static int static int
checkentry_v1(const char *tablename, checkentry_v1(const char *tablename,
const void *entry, const void *entry,
const struct xt_target *target,
void *targinfo, void *targinfo,
unsigned int targinfosize, unsigned int targinfosize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -28,6 +28,7 @@ target(struct sk_buff **pskb, ...@@ -28,6 +28,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -15,6 +15,7 @@ target(struct sk_buff **pskb, ...@@ -15,6 +15,7 @@ target(struct sk_buff **pskb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
unsigned int hooknum, unsigned int hooknum,
const struct xt_target *target,
const void *targinfo, const void *targinfo,
void *userinfo) void *userinfo)
{ {
......
...@@ -19,6 +19,7 @@ static int ...@@ -19,6 +19,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protooff, unsigned int protooff,
......
...@@ -44,6 +44,7 @@ static int ...@@ -44,6 +44,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -122,6 +123,7 @@ match(const struct sk_buff *skb, ...@@ -122,6 +123,7 @@ match(const struct sk_buff *skb,
static int check(const char *tablename, static int check(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -35,6 +35,7 @@ static int ...@@ -35,6 +35,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -52,6 +53,7 @@ match(const struct sk_buff *skb, ...@@ -52,6 +53,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -32,6 +32,7 @@ static int ...@@ -32,6 +32,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -118,6 +119,7 @@ static int ...@@ -118,6 +119,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -95,6 +95,7 @@ static int ...@@ -95,6 +95,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -129,6 +130,7 @@ match(const struct sk_buff *skb, ...@@ -129,6 +130,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -42,6 +42,7 @@ static int ...@@ -42,6 +42,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -89,6 +90,7 @@ static int ...@@ -89,6 +90,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -135,6 +137,7 @@ match(const struct sk_buff *skb, ...@@ -135,6 +137,7 @@ match(const struct sk_buff *skb,
static int check(const char *tablename, static int check(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -24,6 +24,7 @@ static int ...@@ -24,6 +24,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -39,6 +40,7 @@ static int ...@@ -39,6 +40,7 @@ static int
match6(const struct sk_buff *skb, match6(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -68,6 +68,7 @@ static int ...@@ -68,6 +68,7 @@ static int
ipt_limit_match(const struct sk_buff *skb, ipt_limit_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -107,6 +108,7 @@ user2credits(u_int32_t user) ...@@ -107,6 +108,7 @@ user2credits(u_int32_t user)
static int static int
ipt_limit_checkentry(const char *tablename, ipt_limit_checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -27,6 +27,7 @@ static int ...@@ -27,6 +27,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -23,6 +23,7 @@ static int ...@@ -23,6 +23,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -36,6 +37,7 @@ match(const struct sk_buff *skb, ...@@ -36,6 +37,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *entry, const void *entry,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -26,6 +26,7 @@ static int ...@@ -26,6 +26,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -102,6 +103,7 @@ match(const struct sk_buff *skb, ...@@ -102,6 +103,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -22,6 +22,7 @@ MODULE_ALIAS("ip6t_pkttype"); ...@@ -22,6 +22,7 @@ MODULE_ALIAS("ip6t_pkttype");
static int match(const struct sk_buff *skb, static int match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -27,6 +27,7 @@ static int ...@@ -27,6 +27,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -123,6 +123,7 @@ static int ...@@ -123,6 +123,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -162,6 +163,7 @@ match(const struct sk_buff *skb, ...@@ -162,6 +163,7 @@ match(const struct sk_buff *skb,
static int static int
checkentry(const char *tablename, checkentry(const char *tablename,
const void *inf, const void *inf,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
...@@ -24,6 +24,7 @@ static int ...@@ -24,6 +24,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -24,6 +24,7 @@ MODULE_ALIAS("ip6t_string"); ...@@ -24,6 +24,7 @@ MODULE_ALIAS("ip6t_string");
static int match(const struct sk_buff *skb, static int match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -43,6 +44,7 @@ static int match(const struct sk_buff *skb, ...@@ -43,6 +44,7 @@ static int match(const struct sk_buff *skb,
static int checkentry(const char *tablename, static int checkentry(const char *tablename,
const void *ip, const void *ip,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -64,7 +66,8 @@ static int checkentry(const char *tablename, ...@@ -64,7 +66,8 @@ static int checkentry(const char *tablename,
return 1; return 1;
} }
static void destroy(void *matchinfo, unsigned int matchsize) 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);
} }
......
...@@ -81,6 +81,7 @@ static int ...@@ -81,6 +81,7 @@ static int
match(const struct sk_buff *skb, match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
......
...@@ -74,6 +74,7 @@ static int ...@@ -74,6 +74,7 @@ static int
tcp_match(const struct sk_buff *skb, tcp_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -138,6 +139,7 @@ tcp_match(const struct sk_buff *skb, ...@@ -138,6 +139,7 @@ tcp_match(const struct sk_buff *skb,
static int static int
tcp_checkentry(const char *tablename, tcp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
...@@ -152,6 +154,7 @@ static int ...@@ -152,6 +154,7 @@ static int
udp_match(const struct sk_buff *skb, udp_match(const struct sk_buff *skb,
const struct net_device *in, const struct net_device *in,
const struct net_device *out, const struct net_device *out,
const struct xt_match *match,
const void *matchinfo, const void *matchinfo,
int offset, int offset,
unsigned int protoff, unsigned int protoff,
...@@ -185,6 +188,7 @@ udp_match(const struct sk_buff *skb, ...@@ -185,6 +188,7 @@ udp_match(const struct sk_buff *skb,
static int static int
udp_checkentry(const char *tablename, udp_checkentry(const char *tablename,
const void *info, const void *info,
const struct xt_match *match,
void *matchinfo, void *matchinfo,
unsigned int matchsize, unsigned int matchsize,
unsigned int hook_mask) unsigned int hook_mask)
......
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