[PATCH] wireless: WE-20 compatibility for ESSID and NICKN ioctls
[powerpc.git] / net / netfilter / xt_connbytes.c
index f34ecb9..dcc497e 100644 (file)
@@ -125,7 +125,6 @@ static int check(const char *tablename,
                 const void *ip,
                 const struct xt_match *match,
                 void *matchinfo,
-                unsigned int matchsize,
                 unsigned int hook_mask)
 {
        const struct xt_connbytes_info *sinfo = matchinfo;
@@ -143,39 +142,36 @@ static int check(const char *tablename,
        return 1;
 }
 
-static struct xt_match connbytes_match = {
-       .name           = "connbytes",
-       .match          = match,
-       .checkentry     = check,
-       .matchsize      = sizeof(struct xt_connbytes_info),
-       .me             = THIS_MODULE
-};
-static struct xt_match connbytes6_match = {
-       .name           = "connbytes",
-       .match          = match,
-       .checkentry     = check,
-       .matchsize      = sizeof(struct xt_connbytes_info),
-       .me             = THIS_MODULE
+static struct xt_match xt_connbytes_match[] = {
+       {
+               .name           = "connbytes",
+               .family         = AF_INET,
+               .checkentry     = check,
+               .match          = match,
+               .matchsize      = sizeof(struct xt_connbytes_info),
+               .me             = THIS_MODULE
+       },
+       {
+               .name           = "connbytes",
+               .family         = AF_INET6,
+               .checkentry     = check,
+               .match          = match,
+               .matchsize      = sizeof(struct xt_connbytes_info),
+               .me             = THIS_MODULE
+       },
 };
 
-static int __init init(void)
+static int __init xt_connbytes_init(void)
 {
-       int ret;
-       ret = xt_register_match(AF_INET, &connbytes_match);
-       if (ret)
-               return ret;
-
-       ret = xt_register_match(AF_INET6, &connbytes6_match);
-       if (ret)
-               xt_unregister_match(AF_INET, &connbytes_match);
-       return ret;
+       return xt_register_matches(xt_connbytes_match,
+                                  ARRAY_SIZE(xt_connbytes_match));
 }
 
-static void __exit fini(void)
+static void __exit xt_connbytes_fini(void)
 {
-       xt_unregister_match(AF_INET, &connbytes_match);
-       xt_unregister_match(AF_INET6, &connbytes6_match);
+       xt_unregister_matches(xt_connbytes_match,
+                             ARRAY_SIZE(xt_connbytes_match));
 }
 
-module_init(init);
-module_exit(fini);
+module_init(xt_connbytes_init);
+module_exit(xt_connbytes_fini);