]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_owner.c
fat: Cleanup msdos_lookup()
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_owner.c
index 9059c16144c3cb1d67fe3d6accc2f6951744e5a7..f19ebd9b78f5040b6a16ff84a7771e8530e830c2 100644 (file)
 #include <linux/netfilter_ipv6/ip6t_owner.h>
 
 static bool
-owner_mt_v0(const struct sk_buff *skb, const struct net_device *in,
-            const struct net_device *out, const struct xt_match *match,
-            const void *matchinfo, int offset, unsigned int protoff,
-            bool *hotdrop)
+owner_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct ipt_owner_info *info = matchinfo;
+       const struct ipt_owner_info *info = par->matchinfo;
        const struct file *filp;
 
        if (skb->sk == NULL || skb->sk->sk_socket == NULL)
@@ -50,12 +47,9 @@ owner_mt_v0(const struct sk_buff *skb, const struct net_device *in,
 }
 
 static bool
-owner_mt6_v0(const struct sk_buff *skb, const struct net_device *in,
-             const struct net_device *out, const struct xt_match *match,
-             const void *matchinfo, int offset, unsigned int protoff,
-             bool *hotdrop)
+owner_mt6_v0(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct ip6t_owner_info *info = matchinfo;
+       const struct ip6t_owner_info *info = par->matchinfo;
        const struct file *filp;
 
        if (skb->sk == NULL || skb->sk->sk_socket == NULL)
@@ -79,12 +73,9 @@ owner_mt6_v0(const struct sk_buff *skb, const struct net_device *in,
 }
 
 static bool
-owner_mt(const struct sk_buff *skb, const struct net_device *in,
-         const struct net_device *out, const struct xt_match *match,
-         const void *matchinfo, int offset, unsigned int protoff,
-         bool *hotdrop)
+owner_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct xt_owner_match_info *info = matchinfo;
+       const struct xt_owner_match_info *info = par->matchinfo;
        const struct file *filp;
 
        if (skb->sk == NULL || skb->sk->sk_socket == NULL)
@@ -116,12 +107,9 @@ owner_mt(const struct sk_buff *skb, const struct net_device *in,
        return true;
 }
 
-static bool
-owner_mt_check_v0(const char *tablename, const void *ip,
-                  const struct xt_match *match, void *matchinfo,
-                  unsigned int hook_mask)
+static bool owner_mt_check_v0(const struct xt_mtchk_param *par)
 {
-       const struct ipt_owner_info *info = matchinfo;
+       const struct ipt_owner_info *info = par->matchinfo;
 
        if (info->match & (IPT_OWNER_PID | IPT_OWNER_SID | IPT_OWNER_COMM)) {
                printk(KERN_WARNING KBUILD_MODNAME
@@ -133,12 +121,9 @@ owner_mt_check_v0(const char *tablename, const void *ip,
        return true;
 }
 
-static bool
-owner_mt6_check_v0(const char *tablename, const void *ip,
-                   const struct xt_match *match, void *matchinfo,
-                   unsigned int hook_mask)
+static bool owner_mt6_check_v0(const struct xt_mtchk_param *par)
 {
-       const struct ip6t_owner_info *info = matchinfo;
+       const struct ip6t_owner_info *info = par->matchinfo;
 
        if (info->match & (IP6T_OWNER_PID | IP6T_OWNER_SID)) {
                printk(KERN_WARNING KBUILD_MODNAME
@@ -153,7 +138,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = {
        {
                .name       = "owner",
                .revision   = 0,
-               .family     = AF_INET,
+               .family     = NFPROTO_IPV4,
                .match      = owner_mt_v0,
                .matchsize  = sizeof(struct ipt_owner_info),
                .checkentry = owner_mt_check_v0,
@@ -164,7 +149,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = {
        {
                .name       = "owner",
                .revision   = 0,
-               .family     = AF_INET6,
+               .family     = NFPROTO_IPV6,
                .match      = owner_mt6_v0,
                .matchsize  = sizeof(struct ip6t_owner_info),
                .checkentry = owner_mt6_check_v0,
@@ -175,17 +160,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = {
        {
                .name       = "owner",
                .revision   = 1,
-               .family     = AF_INET,
-               .match      = owner_mt,
-               .matchsize  = sizeof(struct xt_owner_match_info),
-               .hooks      = (1 << NF_INET_LOCAL_OUT) |
-                             (1 << NF_INET_POST_ROUTING),
-               .me         = THIS_MODULE,
-       },
-       {
-               .name       = "owner",
-               .revision   = 1,
-               .family     = AF_INET6,
+               .family     = NFPROTO_UNSPEC,
                .match      = owner_mt,
                .matchsize  = sizeof(struct xt_owner_match_info),
                .hooks      = (1 << NF_INET_LOCAL_OUT) |