[NETFILTER]: x_tables: remove unused argument to target functions
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4470bbc749
commit
fe1cb10873
@@ -211,8 +211,7 @@ struct xt_target
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo);
|
||||||
void *userdata);
|
|
||||||
|
|
||||||
/* Called when user tries to insert an entry of this type:
|
/* Called when user tries to insert an entry of this type:
|
||||||
hook_mask is a bitmask of hooks from which it can be
|
hook_mask is a bitmask of hooks from which it can be
|
||||||
|
@@ -248,8 +248,7 @@ extern unsigned int arpt_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct arpt_table *table,
|
struct arpt_table *table);
|
||||||
void *userdata);
|
|
||||||
|
|
||||||
#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1))
|
#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1))
|
||||||
#endif /*__KERNEL__*/
|
#endif /*__KERNEL__*/
|
||||||
|
@@ -312,8 +312,7 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct ipt_table *table,
|
struct ipt_table *table);
|
||||||
void *userdata);
|
|
||||||
|
|
||||||
#define IPT_ALIGN(s) XT_ALIGN(s)
|
#define IPT_ALIGN(s) XT_ALIGN(s)
|
||||||
|
|
||||||
|
@@ -300,8 +300,7 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct ip6t_table *table,
|
struct ip6t_table *table);
|
||||||
void *userdata);
|
|
||||||
|
|
||||||
/* Check for an extension */
|
/* Check for an extension */
|
||||||
extern int ip6t_ext_hdr(u8 nexthdr);
|
extern int ip6t_ext_hdr(u8 nexthdr);
|
||||||
|
@@ -208,8 +208,7 @@ static unsigned int arpt_error(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
if (net_ratelimit())
|
if (net_ratelimit())
|
||||||
printk("arp_tables: error: '%s'\n", (char *)targinfo);
|
printk("arp_tables: error: '%s'\n", (char *)targinfo);
|
||||||
@@ -226,8 +225,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct arpt_table *table,
|
struct arpt_table *table)
|
||||||
void *userdata)
|
|
||||||
{
|
{
|
||||||
static const char nulldevname[IFNAMSIZ];
|
static const char nulldevname[IFNAMSIZ];
|
||||||
unsigned int verdict = NF_DROP;
|
unsigned int verdict = NF_DROP;
|
||||||
@@ -302,8 +300,7 @@ unsigned int arpt_do_table(struct sk_buff **pskb,
|
|||||||
in, out,
|
in, out,
|
||||||
hook,
|
hook,
|
||||||
t->u.kernel.target,
|
t->u.kernel.target,
|
||||||
t->data,
|
t->data);
|
||||||
userdata);
|
|
||||||
|
|
||||||
/* Target might have changed stuff. */
|
/* Target might have changed stuff. */
|
||||||
arp = (*pskb)->nh.arph;
|
arp = (*pskb)->nh.arph;
|
||||||
|
@@ -11,7 +11,7 @@ static unsigned int
|
|||||||
target(struct sk_buff **pskb,
|
target(struct sk_buff **pskb,
|
||||||
const struct net_device *in, const struct net_device *out,
|
const struct net_device *in, const struct net_device *out,
|
||||||
unsigned int hooknum, const struct xt_target *target,
|
unsigned int hooknum, const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
const struct arpt_mangle *mangle = targinfo;
|
const struct arpt_mangle *mangle = targinfo;
|
||||||
struct arphdr *arp;
|
struct arphdr *arp;
|
||||||
|
@@ -155,7 +155,7 @@ static unsigned int arpt_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return arpt_do_table(pskb, hook, in, out, &packet_filter, NULL);
|
return arpt_do_table(pskb, hook, in, out, &packet_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nf_hook_ops arpt_ops[] = {
|
static struct nf_hook_ops arpt_ops[] = {
|
||||||
|
@@ -104,8 +104,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct ipt_target *target,
|
const struct ipt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
@@ -147,8 +146,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct ipt_target *target,
|
const struct ipt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
@@ -255,7 +253,7 @@ int ip_nat_rule_find(struct sk_buff **pskb,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL);
|
ret = ipt_do_table(pskb, hooknum, in, out, &nat_table);
|
||||||
|
|
||||||
if (ret == NF_ACCEPT) {
|
if (ret == NF_ACCEPT) {
|
||||||
if (!ip_nat_initialized(ct, HOOK2MANIP(hooknum)))
|
if (!ip_nat_initialized(ct, HOOK2MANIP(hooknum)))
|
||||||
|
@@ -180,8 +180,7 @@ ipt_error(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
if (net_ratelimit())
|
if (net_ratelimit())
|
||||||
printk("ip_tables: error: `%s'\n", (char *)targinfo);
|
printk("ip_tables: error: `%s'\n", (char *)targinfo);
|
||||||
@@ -217,8 +216,7 @@ ipt_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct ipt_table *table,
|
struct ipt_table *table)
|
||||||
void *userdata)
|
|
||||||
{
|
{
|
||||||
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
||||||
u_int16_t offset;
|
u_int16_t offset;
|
||||||
@@ -308,8 +306,7 @@ ipt_do_table(struct sk_buff **pskb,
|
|||||||
in, out,
|
in, out,
|
||||||
hook,
|
hook,
|
||||||
t->u.kernel.target,
|
t->u.kernel.target,
|
||||||
t->data,
|
t->data);
|
||||||
userdata);
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETFILTER_DEBUG
|
#ifdef CONFIG_NETFILTER_DEBUG
|
||||||
if (((struct ipt_entry *)table_base)->comefrom
|
if (((struct ipt_entry *)table_base)->comefrom
|
||||||
|
@@ -302,8 +302,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_clusterip_tgt_info *cipinfo = targinfo;
|
const struct ipt_clusterip_tgt_info *cipinfo = targinfo;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
@@ -85,8 +85,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_ECN_info *einfo = targinfo;
|
const struct ipt_ECN_info *einfo = targinfo;
|
||||||
|
|
||||||
|
@@ -416,8 +416,7 @@ ipt_log_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_log_info *loginfo = targinfo;
|
const struct ipt_log_info *loginfo = targinfo;
|
||||||
struct nf_loginfo li;
|
struct nf_loginfo li;
|
||||||
|
@@ -64,8 +64,7 @@ masquerade_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
@@ -55,8 +55,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
@@ -58,8 +58,7 @@ redirect_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
@@ -228,8 +228,7 @@ static unsigned int reject(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_reject_info *reject = targinfo;
|
const struct ipt_reject_info *reject = targinfo;
|
||||||
|
|
||||||
|
@@ -133,8 +133,7 @@ same_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
struct ip_conntrack *ct;
|
struct ip_conntrack *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
@@ -41,8 +41,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
|
const struct ipt_tcpmss_info *tcpmssinfo = targinfo;
|
||||||
struct tcphdr *tcph;
|
struct tcphdr *tcph;
|
||||||
|
@@ -26,8 +26,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ipt_tos_target_info *tosinfo = targinfo;
|
const struct ipt_tos_target_info *tosinfo = targinfo;
|
||||||
struct iphdr *iph = (*pskb)->nh.iph;
|
struct iphdr *iph = (*pskb)->nh.iph;
|
||||||
|
@@ -23,7 +23,7 @@ static unsigned int
|
|||||||
ipt_ttl_target(struct sk_buff **pskb,
|
ipt_ttl_target(struct sk_buff **pskb,
|
||||||
const struct net_device *in, const struct net_device *out,
|
const struct net_device *in, const struct net_device *out,
|
||||||
unsigned int hooknum, const struct xt_target *target,
|
unsigned int hooknum, const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
struct iphdr *iph;
|
struct iphdr *iph;
|
||||||
const struct ipt_TTL_info *info = targinfo;
|
const struct ipt_TTL_info *info = targinfo;
|
||||||
|
@@ -308,7 +308,7 @@ static unsigned int ipt_ulog_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
|
struct ipt_ulog_info *loginfo = (struct ipt_ulog_info *) targinfo;
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ ipt_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
|
return ipt_do_table(pskb, hook, in, out, &packet_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -108,7 +108,7 @@ ipt_local_out_hook(unsigned int hook,
|
|||||||
return NF_ACCEPT;
|
return NF_ACCEPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL);
|
return ipt_do_table(pskb, hook, in, out, &packet_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nf_hook_ops ipt_ops[] = {
|
static struct nf_hook_ops ipt_ops[] = {
|
||||||
|
@@ -119,7 +119,7 @@ ipt_route_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
|
return ipt_do_table(pskb, hook, in, out, &packet_mangler);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -148,7 +148,7 @@ ipt_local_hook(unsigned int hook,
|
|||||||
daddr = (*pskb)->nh.iph->daddr;
|
daddr = (*pskb)->nh.iph->daddr;
|
||||||
tos = (*pskb)->nh.iph->tos;
|
tos = (*pskb)->nh.iph->tos;
|
||||||
|
|
||||||
ret = ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL);
|
ret = ipt_do_table(pskb, hook, in, out, &packet_mangler);
|
||||||
/* Reroute for ANY change. */
|
/* Reroute for ANY change. */
|
||||||
if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
|
if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE
|
||||||
&& ((*pskb)->nh.iph->saddr != saddr
|
&& ((*pskb)->nh.iph->saddr != saddr
|
||||||
|
@@ -95,7 +95,7 @@ ipt_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ipt_do_table(pskb, hook, in, out, &packet_raw, NULL);
|
return ipt_do_table(pskb, hook, in, out, &packet_raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 'raw' is the very first table. */
|
/* 'raw' is the very first table. */
|
||||||
|
@@ -220,8 +220,7 @@ ip6t_error(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
if (net_ratelimit())
|
if (net_ratelimit())
|
||||||
printk("ip6_tables: error: `%s'\n", (char *)targinfo);
|
printk("ip6_tables: error: `%s'\n", (char *)targinfo);
|
||||||
@@ -258,8 +257,7 @@ ip6t_do_table(struct sk_buff **pskb,
|
|||||||
unsigned int hook,
|
unsigned int hook,
|
||||||
const struct net_device *in,
|
const struct net_device *in,
|
||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
struct xt_table *table,
|
struct xt_table *table)
|
||||||
void *userdata)
|
|
||||||
{
|
{
|
||||||
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
@@ -349,8 +347,7 @@ ip6t_do_table(struct sk_buff **pskb,
|
|||||||
in, out,
|
in, out,
|
||||||
hook,
|
hook,
|
||||||
t->u.kernel.target,
|
t->u.kernel.target,
|
||||||
t->data,
|
t->data);
|
||||||
userdata);
|
|
||||||
|
|
||||||
#ifdef CONFIG_NETFILTER_DEBUG
|
#ifdef CONFIG_NETFILTER_DEBUG
|
||||||
if (((struct ip6t_entry *)table_base)->comefrom
|
if (((struct ip6t_entry *)table_base)->comefrom
|
||||||
|
@@ -22,7 +22,7 @@ static unsigned int ip6t_hl_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
struct ipv6hdr *ip6h;
|
struct ipv6hdr *ip6h;
|
||||||
const struct ip6t_HL_info *info = targinfo;
|
const struct ip6t_HL_info *info = targinfo;
|
||||||
|
@@ -427,8 +427,7 @@ ip6t_log_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ip6t_log_info *loginfo = targinfo;
|
const struct ip6t_log_info *loginfo = targinfo;
|
||||||
struct nf_loginfo li;
|
struct nf_loginfo li;
|
||||||
|
@@ -180,8 +180,7 @@ static unsigned int reject6_target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct ip6t_reject_info *reject = targinfo;
|
const struct ip6t_reject_info *reject = targinfo;
|
||||||
|
|
||||||
|
@@ -108,7 +108,7 @@ ip6t_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
|
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -128,7 +128,7 @@ ip6t_local_out_hook(unsigned int hook,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ip6t_do_table(pskb, hook, in, out, &packet_filter, NULL);
|
return ip6t_do_table(pskb, hook, in, out, &packet_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nf_hook_ops ip6t_ops[] = {
|
static struct nf_hook_ops ip6t_ops[] = {
|
||||||
|
@@ -138,7 +138,7 @@ ip6t_route_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ip6t_do_table(pskb, hook, in, out, &packet_mangler, NULL);
|
return ip6t_do_table(pskb, hook, in, out, &packet_mangler);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@@ -174,7 +174,7 @@ ip6t_local_hook(unsigned int hook,
|
|||||||
/* flowlabel and prio (includes version, which shouldn't change either */
|
/* flowlabel and prio (includes version, which shouldn't change either */
|
||||||
flowlabel = *((u_int32_t *) (*pskb)->nh.ipv6h);
|
flowlabel = *((u_int32_t *) (*pskb)->nh.ipv6h);
|
||||||
|
|
||||||
ret = ip6t_do_table(pskb, hook, in, out, &packet_mangler, NULL);
|
ret = ip6t_do_table(pskb, hook, in, out, &packet_mangler);
|
||||||
|
|
||||||
if (ret != NF_DROP && ret != NF_STOLEN
|
if (ret != NF_DROP && ret != NF_STOLEN
|
||||||
&& (memcmp(&(*pskb)->nh.ipv6h->saddr, &saddr, sizeof(saddr))
|
&& (memcmp(&(*pskb)->nh.ipv6h->saddr, &saddr, sizeof(saddr))
|
||||||
|
@@ -122,7 +122,7 @@ ip6t_hook(unsigned int hook,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
int (*okfn)(struct sk_buff *))
|
int (*okfn)(struct sk_buff *))
|
||||||
{
|
{
|
||||||
return ip6t_do_table(pskb, hook, in, out, &packet_raw, NULL);
|
return ip6t_do_table(pskb, hook, in, out, &packet_raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nf_hook_ops ip6t_ops[] = {
|
static struct nf_hook_ops ip6t_ops[] = {
|
||||||
|
@@ -29,8 +29,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_classify_target_info *clinfo = targinfo;
|
const struct xt_classify_target_info *clinfo = targinfo;
|
||||||
|
|
||||||
|
@@ -38,8 +38,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_connmark_target_info *markinfo = targinfo;
|
const struct xt_connmark_target_info *markinfo = targinfo;
|
||||||
u_int32_t diff;
|
u_int32_t diff;
|
||||||
|
@@ -66,7 +66,7 @@ static void secmark_restore(struct sk_buff *skb)
|
|||||||
static unsigned int target(struct sk_buff **pskb, const struct net_device *in,
|
static unsigned int target(struct sk_buff **pskb, const struct net_device *in,
|
||||||
const struct net_device *out, unsigned int hooknum,
|
const struct net_device *out, unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb = *pskb;
|
struct sk_buff *skb = *pskb;
|
||||||
const struct xt_connsecmark_target_info *info = targinfo;
|
const struct xt_connsecmark_target_info *info = targinfo;
|
||||||
|
@@ -32,8 +32,7 @@ static unsigned int target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_DSCP_info *dinfo = targinfo;
|
const struct xt_DSCP_info *dinfo = targinfo;
|
||||||
u_int8_t dscp = ipv4_get_dsfield((*pskb)->nh.iph) >> XT_DSCP_SHIFT;
|
u_int8_t dscp = ipv4_get_dsfield((*pskb)->nh.iph) >> XT_DSCP_SHIFT;
|
||||||
@@ -54,8 +53,7 @@ static unsigned int target6(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_DSCP_info *dinfo = targinfo;
|
const struct xt_DSCP_info *dinfo = targinfo;
|
||||||
u_int8_t dscp = ipv6_get_dsfield((*pskb)->nh.ipv6h) >> XT_DSCP_SHIFT;
|
u_int8_t dscp = ipv6_get_dsfield((*pskb)->nh.ipv6h) >> XT_DSCP_SHIFT;
|
||||||
|
@@ -27,8 +27,7 @@ target_v0(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_mark_target_info *markinfo = targinfo;
|
const struct xt_mark_target_info *markinfo = targinfo;
|
||||||
|
|
||||||
@@ -44,8 +43,7 @@ target_v1(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_mark_target_info_v1 *markinfo = targinfo;
|
const struct xt_mark_target_info_v1 *markinfo = targinfo;
|
||||||
int mark = 0;
|
int mark = 0;
|
||||||
|
@@ -29,8 +29,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
const struct xt_NFQ_info *tinfo = targinfo;
|
const struct xt_NFQ_info *tinfo = targinfo;
|
||||||
|
|
||||||
|
@@ -16,8 +16,7 @@ target(struct sk_buff **pskb,
|
|||||||
const struct net_device *out,
|
const struct net_device *out,
|
||||||
unsigned int hooknum,
|
unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo,
|
const void *targinfo)
|
||||||
void *userinfo)
|
|
||||||
{
|
{
|
||||||
/* Previously seen (loopback)? Ignore. */
|
/* Previously seen (loopback)? Ignore. */
|
||||||
if ((*pskb)->nfct != NULL)
|
if ((*pskb)->nfct != NULL)
|
||||||
|
@@ -31,7 +31,7 @@ static u8 mode;
|
|||||||
static unsigned int target(struct sk_buff **pskb, const struct net_device *in,
|
static unsigned int target(struct sk_buff **pskb, const struct net_device *in,
|
||||||
const struct net_device *out, unsigned int hooknum,
|
const struct net_device *out, unsigned int hooknum,
|
||||||
const struct xt_target *target,
|
const struct xt_target *target,
|
||||||
const void *targinfo, void *userinfo)
|
const void *targinfo)
|
||||||
{
|
{
|
||||||
u32 secmark = 0;
|
u32 secmark = 0;
|
||||||
const struct xt_secmark_target_info *info = targinfo;
|
const struct xt_secmark_target_info *info = targinfo;
|
||||||
|
@@ -143,7 +143,7 @@ static int check(const char *tablename,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct xt_match xt_connbytes_match = {
|
static struct xt_match xt_connbytes_match[] = {
|
||||||
{
|
{
|
||||||
.name = "connbytes",
|
.name = "connbytes",
|
||||||
.family = AF_INET,
|
.family = AF_INET,
|
||||||
|
@@ -222,7 +222,7 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a,
|
|||||||
ret = ipt->tcfi_t->u.kernel.target->target(&skb, skb->dev, NULL,
|
ret = ipt->tcfi_t->u.kernel.target->target(&skb, skb->dev, NULL,
|
||||||
ipt->tcfi_hook,
|
ipt->tcfi_hook,
|
||||||
ipt->tcfi_t->u.kernel.target,
|
ipt->tcfi_t->u.kernel.target,
|
||||||
ipt->tcfi_t->data, NULL);
|
ipt->tcfi_t->data);
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case NF_ACCEPT:
|
case NF_ACCEPT:
|
||||||
result = TC_ACT_OK;
|
result = TC_ACT_OK;
|
||||||
|
Reference in New Issue
Block a user