2019-06-04 02:11:33 -06:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2005-04-16 16:20:36 -06: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>
|
|
|
|
*/
|
2010-03-17 09:04:40 -06:00
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
2005-04-16 16:20:36 -06:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/skbuff.h>
|
2006-08-15 01:04:56 -06: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 14:30:04 -07:00
|
|
|
#include <linux/netfilter/xt_physdev.h>
|
|
|
|
#include <linux/netfilter/x_tables.h>
|
2014-10-02 03:13:21 -06:00
|
|
|
#include <net/netfilter/br_netfilter.h>
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
|
2008-01-15 00:42:28 -07: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 14:30:04 -07:00
|
|
|
MODULE_ALIAS("ipt_physdev");
|
|
|
|
MODULE_ALIAS("ip6t_physdev");
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2009-02-19 03:17:17 -07:00
|
|
|
|
2007-07-07 23:15:35 -06:00
|
|
|
static bool
|
2009-07-07 12:42:08 -06:00
|
|
|
physdev_mt(const struct sk_buff *skb, struct xt_action_param *par)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2008-10-08 03:35:18 -06:00
|
|
|
const struct xt_physdev_info *info = par->matchinfo;
|
2015-04-02 06:31:42 -06:00
|
|
|
const struct net_device *physdev;
|
2009-02-18 11:11:39 -07:00
|
|
|
unsigned long ret;
|
2005-04-16 16:20:36 -06:00
|
|
|
const char *indev, *outdev;
|
|
|
|
|
|
|
|
/* 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. */
|
2018-12-18 09:15:15 -07:00
|
|
|
if (!nf_bridge_info_exists(skb)) {
|
2005-04-16 16:20:36 -06:00
|
|
|
/* 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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_BRIDGED) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_BRIDGED))
|
2007-07-07 23:15:35 -06: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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISIN) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_ISIN))
|
2007-07-07 23:15:35 -06: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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISOUT) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_ISOUT))
|
2007-07-07 23:15:35 -06: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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_IN) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_IN))
|
2007-07-07 23:15:35 -06: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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_OUT) &&
|
|
|
|
!(info->invert & XT_PHYSDEV_OP_OUT))
|
2007-07-07 23:15:35 -06:00
|
|
|
return false;
|
|
|
|
return true;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2015-04-02 06:31:42 -06:00
|
|
|
physdev = nf_bridge_get_physoutdev(skb);
|
|
|
|
outdev = physdev ? physdev->name : NULL;
|
|
|
|
|
2005-04-16 16:20:36 -06: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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_BRIDGED) &&
|
2015-04-02 06:31:42 -06:00
|
|
|
(!!outdev ^ !(info->invert & XT_PHYSDEV_OP_BRIDGED)))
|
2007-07-07 23:15:35 -06:00
|
|
|
return false;
|
2005-04-16 16:20:36 -06:00
|
|
|
|
2015-04-02 06:31:42 -06:00
|
|
|
physdev = nf_bridge_get_physindev(skb);
|
|
|
|
indev = physdev ? physdev->name : NULL;
|
|
|
|
|
[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 14:30:04 -07:00
|
|
|
if ((info->bitmask & XT_PHYSDEV_OP_ISIN &&
|
2015-04-02 06:31:42 -06:00
|
|
|
(!indev ^ !!(info->invert & XT_PHYSDEV_OP_ISIN))) ||
|
[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 14:30:04 -07:00
|
|
|
(info->bitmask & XT_PHYSDEV_OP_ISOUT &&
|
2015-04-02 06:31:42 -06:00
|
|
|
(!outdev ^ !!(info->invert & XT_PHYSDEV_OP_ISOUT))))
|
2007-07-07 23:15:35 -06:00
|
|
|
return false;
|
2005-04-16 16:20:36 -06: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 14:30:04 -07:00
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_IN))
|
2005-04-16 16:20:36 -06:00
|
|
|
goto match_outdev;
|
|
|
|
|
2015-04-02 06:31:42 -06:00
|
|
|
if (indev) {
|
|
|
|
ret = ifname_compare_aligned(indev, info->physindev,
|
|
|
|
info->in_mask);
|
|
|
|
|
|
|
|
if (!ret ^ !(info->invert & XT_PHYSDEV_OP_IN))
|
|
|
|
return false;
|
|
|
|
}
|
2005-04-16 16:20:36 -06: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 14:30:04 -07:00
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_OUT))
|
2007-07-07 23:15:35 -06:00
|
|
|
return true;
|
2015-04-02 06:31:42 -06:00
|
|
|
|
|
|
|
if (!outdev)
|
|
|
|
return false;
|
|
|
|
|
2009-03-25 10:31:52 -06:00
|
|
|
ret = ifname_compare_aligned(outdev, info->physoutdev, info->out_mask);
|
2009-02-19 03:17:17 -07:00
|
|
|
|
2009-02-18 11:11:39 -07:00
|
|
|
return (!!ret ^ !(info->invert & XT_PHYSDEV_OP_OUT));
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2010-03-19 10:16:42 -06:00
|
|
|
static int physdev_mt_check(const struct xt_mtchk_param *par)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2008-10-08 03:35:18 -06:00
|
|
|
const struct xt_physdev_info *info = par->matchinfo;
|
2019-01-11 06:46:15 -07:00
|
|
|
static bool brnf_probed __read_mostly;
|
2014-10-02 03:13:21 -06: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 14:30:04 -07:00
|
|
|
if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
|
|
|
|
info->bitmask & ~XT_PHYSDEV_OP_MASK)
|
2010-03-23 09:35:56 -06:00
|
|
|
return -EINVAL;
|
2016-07-05 06:55:36 -06:00
|
|
|
if (info->bitmask & (XT_PHYSDEV_OP_OUT | XT_PHYSDEV_OP_ISOUT) &&
|
2006-07-24 23:54:55 -06:00
|
|
|
(!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
|
|
|
|
info->invert & XT_PHYSDEV_OP_BRIDGED) &&
|
2008-10-08 03:35:18 -06:00
|
|
|
par->hook_mask & ((1 << NF_INET_LOCAL_OUT) |
|
|
|
|
(1 << NF_INET_FORWARD) | (1 << NF_INET_POST_ROUTING))) {
|
2018-02-09 07:52:07 -07:00
|
|
|
pr_info_ratelimited("--physdev-out and --physdev-is-out only supported in the FORWARD and POSTROUTING chains with bridged traffic\n");
|
2008-10-08 03:35:18 -06:00
|
|
|
if (par->hook_mask & (1 << NF_INET_LOCAL_OUT))
|
2010-03-23 09:35:56 -06:00
|
|
|
return -EINVAL;
|
2006-07-24 23:54:55 -06:00
|
|
|
}
|
2019-01-11 06:46:15 -07:00
|
|
|
|
|
|
|
if (!brnf_probed) {
|
|
|
|
brnf_probed = true;
|
|
|
|
request_module("br_netfilter");
|
|
|
|
}
|
|
|
|
|
2010-03-23 09:35:56 -06:00
|
|
|
return 0;
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2008-10-08 03:35:20 -06:00
|
|
|
static struct xt_match physdev_mt_reg __read_mostly = {
|
|
|
|
.name = "physdev",
|
|
|
|
.revision = 0,
|
|
|
|
.family = NFPROTO_UNSPEC,
|
|
|
|
.checkentry = physdev_mt_check,
|
|
|
|
.match = physdev_mt,
|
|
|
|
.matchsize = sizeof(struct xt_physdev_info),
|
|
|
|
.me = THIS_MODULE,
|
2005-04-16 16:20:36 -06:00
|
|
|
};
|
|
|
|
|
2007-12-05 00:24:03 -07:00
|
|
|
static int __init physdev_mt_init(void)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2008-10-08 03:35:20 -06:00
|
|
|
return xt_register_match(&physdev_mt_reg);
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2007-12-05 00:24:03 -07:00
|
|
|
static void __exit physdev_mt_exit(void)
|
2005-04-16 16:20:36 -06:00
|
|
|
{
|
2008-10-08 03:35:20 -06:00
|
|
|
xt_unregister_match(&physdev_mt_reg);
|
2005-04-16 16:20:36 -06:00
|
|
|
}
|
|
|
|
|
2007-12-05 00:24:03 -07:00
|
|
|
module_init(physdev_mt_init);
|
|
|
|
module_exit(physdev_mt_exit);
|