diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-20 18:01:43 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 18:01:43 -0800 |
commit | 7f9397138e297904bf1c717651183e785a01ff13 (patch) | |
tree | 67b39ba381e8ffd2340d002a118252be0fc2e923 /net/ipv6/netfilter/ip6t_owner.c | |
parent | aa83c1ab4384c0905527c84e5135a56daa885834 (diff) | |
download | kernel_samsung_smdk4412-7f9397138e297904bf1c717651183e785a01ff13.zip kernel_samsung_smdk4412-7f9397138e297904bf1c717651183e785a01ff13.tar.gz kernel_samsung_smdk4412-7f9397138e297904bf1c717651183e785a01ff13.tar.bz2 |
[NETFILTER]: Convert ip6_tables matches/targets to centralized error checking
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/netfilter/ip6t_owner.c')
-rw-r--r-- | net/ipv6/netfilter/ip6t_owner.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/net/ipv6/netfilter/ip6t_owner.c b/net/ipv6/netfilter/ip6t_owner.c index 8c8a4c7..e26cd6d 100644 --- a/net/ipv6/netfilter/ip6t_owner.c +++ b/net/ipv6/netfilter/ip6t_owner.c @@ -60,28 +60,20 @@ checkentry(const char *tablename, { const struct ip6t_owner_info *info = matchinfo; - if (hook_mask - & ~((1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING))) { - printk("ip6t_owner: only valid for LOCAL_OUT or POST_ROUTING.\n"); - return 0; - } - - if (matchsize != IP6T_ALIGN(sizeof(struct ip6t_owner_info))) - return 0; - if (info->match & (IP6T_OWNER_PID | IP6T_OWNER_SID)) { printk("ipt_owner: pid and sid matching " "not supported anymore\n"); return 0; } - return 1; } static struct ip6t_match owner_match = { .name = "owner", - .match = &match, - .checkentry = &checkentry, + .match = match, + .matchsize = sizeof(struct ip6t_owner_info), + .hooks = (1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING), + .checkentry = checkentry, .me = THIS_MODULE, }; |