diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2006-03-22 21:55:40 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-22 21:55:40 (GMT) |
commit | a45049c51ce6a3fecf2a909b591b28164c927112 (patch) | |
tree | 582c35205f9c1c12825447a009518eb2116beacd /net/netfilter/xt_policy.c | |
parent | 4e3882f77376e036a52b022909d7e910714bd27b (diff) | |
download | linux-fsl-qoriq-a45049c51ce6a3fecf2a909b591b28164c927112.tar.xz |
[NETFILTER]: x_tables: set the protocol family in x_tables targets/matches
Set the family field in xt_[matches|targets] registered.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_policy.c')
-rw-r--r-- | net/netfilter/xt_policy.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c index 1ec2208..d57a611 100644 --- a/net/netfilter/xt_policy.c +++ b/net/netfilter/xt_policy.c @@ -172,6 +172,7 @@ static struct xt_match policy_match = { .match = match, .matchsize = sizeof(struct xt_policy_info), .checkentry = checkentry, + .family = AF_INET, .me = THIS_MODULE, }; @@ -181,6 +182,7 @@ static struct xt_match policy6_match = { .match = match, .matchsize = sizeof(struct xt_policy_info), .checkentry = checkentry, + .family = AF_INET6, .me = THIS_MODULE, }; @@ -188,19 +190,19 @@ static int __init init(void) { int ret; - ret = xt_register_match(AF_INET, &policy_match); + ret = xt_register_match(&policy_match); if (ret) return ret; - ret = xt_register_match(AF_INET6, &policy6_match); + ret = xt_register_match(&policy6_match); if (ret) - xt_unregister_match(AF_INET, &policy_match); + xt_unregister_match(&policy_match); return ret; } static void __exit fini(void) { - xt_unregister_match(AF_INET6, &policy6_match); - xt_unregister_match(AF_INET, &policy_match); + xt_unregister_match(&policy6_match); + xt_unregister_match(&policy_match); } module_init(init); |