[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
/* iptables module for using new netfilter netlink queue
|
|
|
|
*
|
|
|
|
* (C) 2005 by Harald Welte <laforge@netfilter.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2007-02-12 20:15:49 +01:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
* published by the Free Software Foundation.
|
2007-02-12 20:15:49 +01:00
|
|
|
*
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
*/
|
|
|
|
|
2018-02-09 15:52:02 +01:00
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/skbuff.h>
|
|
|
|
|
|
|
|
#include <linux/netfilter.h>
|
|
|
|
#include <linux/netfilter_arp.h>
|
|
|
|
#include <linux/netfilter/x_tables.h>
|
|
|
|
#include <linux/netfilter/xt_NFQUEUE.h>
|
|
|
|
|
2013-12-06 00:24:12 +01:00
|
|
|
#include <net/netfilter/nf_queue.h>
|
|
|
|
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
|
2008-01-15 08:42:28 +01:00
|
|
|
MODULE_DESCRIPTION("Xtables: packet forwarding to netlink");
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_ALIAS("ipt_NFQUEUE");
|
|
|
|
MODULE_ALIAS("ip6t_NFQUEUE");
|
|
|
|
MODULE_ALIAS("arpt_NFQUEUE");
|
|
|
|
|
2009-06-05 13:24:24 +02:00
|
|
|
static u32 jhash_initval __read_mostly;
|
|
|
|
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
static unsigned int
|
2009-07-05 19:43:26 +02:00
|
|
|
nfqueue_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
{
|
2008-10-08 11:35:19 +02:00
|
|
|
const struct xt_NFQ_info *tinfo = par->targinfo;
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
|
|
|
|
return NF_QUEUE_NR(tinfo->queuenum);
|
|
|
|
}
|
|
|
|
|
2013-03-23 11:04:04 +01:00
|
|
|
static unsigned int
|
|
|
|
nfqueue_tg_v1(struct sk_buff *skb, const struct xt_action_param *par)
|
|
|
|
{
|
|
|
|
const struct xt_NFQ_info_v1 *info = par->targinfo;
|
|
|
|
u32 queue = info->queuenum;
|
|
|
|
|
2013-12-06 00:24:12 +01:00
|
|
|
if (info->queues_total > 1) {
|
|
|
|
queue = nfqueue_hash(skb, queue, info->queues_total,
|
2016-11-03 10:56:21 +01:00
|
|
|
xt_family(par), jhash_initval);
|
2013-12-06 00:24:12 +01:00
|
|
|
}
|
2009-06-05 13:24:24 +02:00
|
|
|
return NF_QUEUE_NR(queue);
|
|
|
|
}
|
|
|
|
|
2011-01-18 16:08:30 +01:00
|
|
|
static unsigned int
|
|
|
|
nfqueue_tg_v2(struct sk_buff *skb, const struct xt_action_param *par)
|
2009-06-05 13:24:24 +02:00
|
|
|
{
|
2011-01-18 16:08:30 +01:00
|
|
|
const struct xt_NFQ_info_v2 *info = par->targinfo;
|
|
|
|
unsigned int ret = nfqueue_tg_v1(skb, par);
|
|
|
|
|
|
|
|
if (info->bypass)
|
|
|
|
ret |= NF_VERDICT_FLAG_QUEUE_BYPASS;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int nfqueue_tg_check(const struct xt_tgchk_param *par)
|
|
|
|
{
|
2013-03-23 11:04:03 +01:00
|
|
|
const struct xt_NFQ_info_v3 *info = par->targinfo;
|
2009-06-05 13:24:24 +02:00
|
|
|
u32 maxid;
|
|
|
|
|
2013-12-06 00:24:12 +01:00
|
|
|
init_hashrandom(&jhash_initval);
|
|
|
|
|
2009-06-05 13:24:24 +02:00
|
|
|
if (info->queues_total == 0) {
|
2018-02-09 15:52:02 +01:00
|
|
|
pr_info_ratelimited("number of total queues is 0\n");
|
2010-03-25 16:34:45 +01:00
|
|
|
return -EINVAL;
|
2009-06-05 13:24:24 +02:00
|
|
|
}
|
|
|
|
maxid = info->queues_total - 1 + info->queuenum;
|
|
|
|
if (maxid > 0xffff) {
|
2018-02-09 15:52:02 +01:00
|
|
|
pr_info_ratelimited("number of queues (%u) out of range (got %u)\n",
|
|
|
|
info->queues_total, maxid);
|
2010-03-19 17:32:59 +01:00
|
|
|
return -ERANGE;
|
2009-06-05 13:24:24 +02:00
|
|
|
}
|
2013-03-23 11:04:03 +01:00
|
|
|
if (par->target->revision == 2 && info->flags > 1)
|
|
|
|
return -EINVAL;
|
|
|
|
if (par->target->revision == 3 && info->flags & ~NFQ_FLAG_MASK)
|
2011-01-18 16:08:30 +01:00
|
|
|
return -EINVAL;
|
2013-03-23 11:04:03 +01:00
|
|
|
|
2010-03-25 16:34:45 +01:00
|
|
|
return 0;
|
2009-06-05 13:24:24 +02:00
|
|
|
}
|
|
|
|
|
2013-03-23 11:04:03 +01:00
|
|
|
static unsigned int
|
|
|
|
nfqueue_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
|
|
|
|
{
|
|
|
|
const struct xt_NFQ_info_v3 *info = par->targinfo;
|
|
|
|
u32 queue = info->queuenum;
|
2013-10-28 14:42:33 +01:00
|
|
|
int ret;
|
2013-03-23 11:04:03 +01:00
|
|
|
|
|
|
|
if (info->queues_total > 1) {
|
|
|
|
if (info->flags & NFQ_FLAG_CPU_FANOUT) {
|
|
|
|
int cpu = smp_processor_id();
|
|
|
|
|
|
|
|
queue = info->queuenum + cpu % info->queues_total;
|
2013-12-06 00:24:12 +01:00
|
|
|
} else {
|
|
|
|
queue = nfqueue_hash(skb, queue, info->queues_total,
|
2016-11-03 10:56:21 +01:00
|
|
|
xt_family(par), jhash_initval);
|
2013-12-06 00:24:12 +01:00
|
|
|
}
|
2013-03-23 11:04:03 +01:00
|
|
|
}
|
2013-03-23 11:04:04 +01:00
|
|
|
|
2013-10-28 14:42:33 +01:00
|
|
|
ret = NF_QUEUE_NR(queue);
|
|
|
|
if (info->flags & NFQ_FLAG_BYPASS)
|
|
|
|
ret |= NF_VERDICT_FLAG_QUEUE_BYPASS;
|
|
|
|
|
|
|
|
return ret;
|
2013-03-23 11:04:03 +01:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static struct xt_target nfqueue_tg_reg[] __read_mostly = {
|
2006-08-22 09:34:04 +02:00
|
|
|
{
|
|
|
|
.name = "NFQUEUE",
|
2009-06-05 13:18:07 +02:00
|
|
|
.family = NFPROTO_UNSPEC,
|
2007-12-05 08:24:03 +01:00
|
|
|
.target = nfqueue_tg,
|
2006-08-22 09:34:04 +02:00
|
|
|
.targetsize = sizeof(struct xt_NFQ_info),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
2009-06-05 13:24:24 +02:00
|
|
|
{
|
|
|
|
.name = "NFQUEUE",
|
|
|
|
.revision = 1,
|
2009-06-05 15:22:15 +02:00
|
|
|
.family = NFPROTO_UNSPEC,
|
2011-01-18 16:08:30 +01:00
|
|
|
.checkentry = nfqueue_tg_check,
|
2009-06-05 15:22:15 +02:00
|
|
|
.target = nfqueue_tg_v1,
|
2009-06-05 13:24:24 +02:00
|
|
|
.targetsize = sizeof(struct xt_NFQ_info_v1),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
2011-01-18 16:08:30 +01:00
|
|
|
{
|
|
|
|
.name = "NFQUEUE",
|
|
|
|
.revision = 2,
|
|
|
|
.family = NFPROTO_UNSPEC,
|
|
|
|
.checkentry = nfqueue_tg_check,
|
|
|
|
.target = nfqueue_tg_v2,
|
|
|
|
.targetsize = sizeof(struct xt_NFQ_info_v2),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
2013-03-23 11:04:03 +01:00
|
|
|
{
|
|
|
|
.name = "NFQUEUE",
|
|
|
|
.revision = 3,
|
|
|
|
.family = NFPROTO_UNSPEC,
|
|
|
|
.checkentry = nfqueue_tg_check,
|
|
|
|
.target = nfqueue_tg_v3,
|
|
|
|
.targetsize = sizeof(struct xt_NFQ_info_v3),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
};
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static int __init nfqueue_tg_init(void)
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
{
|
2007-12-05 08:24:03 +01:00
|
|
|
return xt_register_targets(nfqueue_tg_reg, ARRAY_SIZE(nfqueue_tg_reg));
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static void __exit nfqueue_tg_exit(void)
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
{
|
2007-12-05 08:24:03 +01:00
|
|
|
xt_unregister_targets(nfqueue_tg_reg, ARRAY_SIZE(nfqueue_tg_reg));
|
[NETFILTER] x_tables: Abstraction layer for {ip,ip6,arp}_tables
This monster-patch tries to do the best job for unifying the data
structures and backend interfaces for the three evil clones ip_tables,
ip6_tables and arp_tables. In an ideal world we would never have
allowed this kind of copy+paste programming... but well, our world
isn't (yet?) ideal.
o introduce a new x_tables module
o {ip,arp,ip6}_tables depend on this x_tables module
o registration functions for tables, matches and targets are only
wrappers around x_tables provided functions
o all matches/targets that are used from ip_tables and ip6_tables
are now implemented as xt_FOOBAR.c files and provide module aliases
to ipt_FOOBAR and ip6t_FOOBAR
o header files for xt_matches are in include/linux/netfilter/,
include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
around the xt_FOOBAR.h headers
Based on this patchset we're going to further unify the code,
gradually getting rid of all the layer 3 specific assumptions.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12 22:30:04 +01:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
module_init(nfqueue_tg_init);
|
|
|
|
module_exit(nfqueue_tg_exit);
|