2005-04-17 00:20:36 +02:00
|
|
|
/* Kernel module to match the bridge port in and
|
|
|
|
* out device for IP packets coming into contact with a bridge. */
|
|
|
|
|
|
|
|
/* (C) 2001-2003 Bart De Schuymer <bdschuym@pandora.be>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/skbuff.h>
|
2006-08-15 09:04:56 +02:00
|
|
|
#include <linux/netfilter_bridge.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
|
|
|
#include <linux/netfilter/xt_physdev.h>
|
|
|
|
#include <linux/netfilter/x_tables.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
|
2008-01-15 08:42:28 +01:00
|
|
|
MODULE_DESCRIPTION("Xtables: Bridge physical device match");
|
[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_ALIAS("ipt_physdev");
|
|
|
|
MODULE_ALIAS("ip6t_physdev");
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2007-07-08 07:15:35 +02:00
|
|
|
static bool
|
2008-10-08 11:35:18 +02:00
|
|
|
physdev_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
2005-04-17 00:20:36 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
static const char nulldevname[IFNAMSIZ];
|
2008-10-08 11:35:18 +02:00
|
|
|
const struct xt_physdev_info *info = par->matchinfo;
|
2007-07-08 07:15:35 +02:00
|
|
|
bool ret;
|
2005-04-17 00:20:36 +02:00
|
|
|
const char *indev, *outdev;
|
2007-07-08 07:16:55 +02:00
|
|
|
const struct nf_bridge_info *nf_bridge;
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
/* Not a bridged IP packet or no info available yet:
|
|
|
|
* LOCAL_OUT/mangle and LOCAL_OUT/nat don't know if
|
|
|
|
* the destination device will be a bridge. */
|
|
|
|
if (!(nf_bridge = skb->nf_bridge)) {
|
|
|
|
/* Return MATCH if the invert flags of the used options are on */
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_BRIDGED) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_BRIDGED))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISIN) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_ISIN))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISOUT) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_ISOUT))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_IN) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_IN))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_OUT) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_OUT))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
|
|
|
return true;
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* This only makes sense in the FORWARD and POSTROUTING chains */
|
[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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_BRIDGED) &&
|
2005-04-17 00:20:36 +02:00
|
|
|
(!!(nf_bridge->mask & BRNF_BRIDGED) ^
|
[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
|
|
|
!(info->invert & XT_PHYSDEV_OP_BRIDGED)))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
2005-04-17 00:20:36 +02: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
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISIN &&
|
|
|
|
(!nf_bridge->physindev ^ !!(info->invert & XT_PHYSDEV_OP_ISIN))) ||
|
|
|
|
(info->bitmask & XT_PHYSDEV_OP_ISOUT &&
|
|
|
|
(!nf_bridge->physoutdev ^ !!(info->invert & XT_PHYSDEV_OP_ISOUT))))
|
2007-07-08 07:15:35 +02:00
|
|
|
return false;
|
2005-04-17 00:20:36 +02: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
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_IN))
|
2005-04-17 00:20:36 +02:00
|
|
|
goto match_outdev;
|
|
|
|
indev = nf_bridge->physindev ? nf_bridge->physindev->name : nulldevname;
|
2007-07-08 07:15:35 +02:00
|
|
|
for (i = 0, ret = false; i < IFNAMSIZ/sizeof(unsigned int); i++) {
|
2005-04-17 00:20:36 +02:00
|
|
|
ret |= (((const unsigned int *)indev)[i]
|
|
|
|
^ ((const unsigned int *)info->physindev)[i])
|
|
|
|
& ((const unsigned int *)info->in_mask)[i];
|
|
|
|
}
|
|
|
|
|
2007-07-08 07:15:35 +02:00
|
|
|
if (!ret ^ !(info->invert & XT_PHYSDEV_OP_IN))
|
|
|
|
return false;
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
match_outdev:
|
[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
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_OUT))
|
2007-07-08 07:15:35 +02:00
|
|
|
return true;
|
2005-04-17 00:20:36 +02:00
|
|
|
outdev = nf_bridge->physoutdev ?
|
|
|
|
nf_bridge->physoutdev->name : nulldevname;
|
2007-07-08 07:15:35 +02:00
|
|
|
for (i = 0, ret = false; i < IFNAMSIZ/sizeof(unsigned int); i++) {
|
2005-04-17 00:20:36 +02:00
|
|
|
ret |= (((const unsigned int *)outdev)[i]
|
|
|
|
^ ((const unsigned int *)info->physoutdev)[i])
|
|
|
|
& ((const unsigned int *)info->out_mask)[i];
|
|
|
|
}
|
|
|
|
|
2007-07-08 07:15:35 +02:00
|
|
|
return ret ^ !(info->invert & XT_PHYSDEV_OP_OUT);
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
2008-10-08 11:35:18 +02:00
|
|
|
static bool physdev_mt_check(const struct xt_mtchk_param *par)
|
2005-04-17 00:20:36 +02:00
|
|
|
{
|
2008-10-08 11:35:18 +02:00
|
|
|
const struct xt_physdev_info *info = par->matchinfo;
|
2005-04-17 00:20:36 +02: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
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
|
|
|
|
info->bitmask & ~XT_PHYSDEV_OP_MASK)
|
2007-07-08 07:16:00 +02:00
|
|
|
return false;
|
2006-12-14 01:54:25 +01:00
|
|
|
if (info->bitmask & XT_PHYSDEV_OP_OUT &&
|
2006-07-25 07:54:55 +02:00
|
|
|
(!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
|
|
|
|
info->invert & XT_PHYSDEV_OP_BRIDGED) &&
|
2008-10-08 11:35:18 +02:00
|
|
|
par->hook_mask & ((1 << NF_INET_LOCAL_OUT) |
|
|
|
|
(1 << NF_INET_FORWARD) | (1 << NF_INET_POST_ROUTING))) {
|
2006-07-25 07:54:55 +02:00
|
|
|
printk(KERN_WARNING "physdev match: using --physdev-out in the "
|
|
|
|
"OUTPUT, FORWARD and POSTROUTING chains for non-bridged "
|
2006-12-14 01:54:25 +01:00
|
|
|
"traffic is not supported anymore.\n");
|
2008-10-08 11:35:18 +02:00
|
|
|
if (par->hook_mask & (1 << NF_INET_LOCAL_OUT))
|
2007-07-08 07:16:00 +02:00
|
|
|
return false;
|
2006-07-25 07:54:55 +02:00
|
|
|
}
|
2007-07-08 07:16:00 +02:00
|
|
|
return true;
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static struct xt_match physdev_mt_reg[] __read_mostly = {
|
2006-08-22 09:34:04 +02:00
|
|
|
{
|
|
|
|
.name = "physdev",
|
2008-10-08 11:35:01 +02:00
|
|
|
.family = NFPROTO_IPV4,
|
2007-12-05 08:24:03 +01:00
|
|
|
.checkentry = physdev_mt_check,
|
|
|
|
.match = physdev_mt,
|
2006-08-22 09:34:04 +02:00
|
|
|
.matchsize = sizeof(struct xt_physdev_info),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.name = "physdev",
|
2008-10-08 11:35:01 +02:00
|
|
|
.family = NFPROTO_IPV6,
|
2007-12-05 08:24:03 +01:00
|
|
|
.checkentry = physdev_mt_check,
|
|
|
|
.match = physdev_mt,
|
2006-08-22 09:34:04 +02:00
|
|
|
.matchsize = sizeof(struct xt_physdev_info),
|
|
|
|
.me = THIS_MODULE,
|
|
|
|
},
|
2005-04-17 00:20:36 +02:00
|
|
|
};
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static int __init physdev_mt_init(void)
|
2005-04-17 00:20:36 +02:00
|
|
|
{
|
2007-12-05 08:24:03 +01:00
|
|
|
return xt_register_matches(physdev_mt_reg, ARRAY_SIZE(physdev_mt_reg));
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
static void __exit physdev_mt_exit(void)
|
2005-04-17 00:20:36 +02:00
|
|
|
{
|
2007-12-05 08:24:03 +01:00
|
|
|
xt_unregister_matches(physdev_mt_reg, ARRAY_SIZE(physdev_mt_reg));
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|
|
|
|
|
2007-12-05 08:24:03 +01:00
|
|
|
module_init(physdev_mt_init);
|
|
|
|
module_exit(physdev_mt_exit);
|