]> err.no Git - linux-2.6/blobdiff - net/netfilter/xt_sctp.c
[NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat...
[linux-2.6] / net / netfilter / xt_sctp.c
index f0a25e5a5306584ace4ab2693e71c8a8eec27f1d..34bd87259a09fea8b84671104c6a314cad5aafbd 100644 (file)
@@ -123,6 +123,7 @@ static int
 match(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,
@@ -162,6 +163,7 @@ match(const struct sk_buff *skb,
 static int
 checkentry(const char *tablename,
           const void *inf,
+          const struct xt_match *match,
           void *matchinfo,
           unsigned int matchsize,
           unsigned int hook_mask)
@@ -184,6 +186,7 @@ static struct xt_match sctp_match = {
        .matchsize      = sizeof(struct xt_sctp_info),
        .proto          = IPPROTO_SCTP,
        .checkentry     = checkentry,
+       .family         = AF_INET,
        .me             = THIS_MODULE
 };
 
@@ -193,28 +196,29 @@ static struct xt_match sctp6_match = {
        .matchsize      = sizeof(struct xt_sctp_info),
        .proto          = IPPROTO_SCTP,
        .checkentry     = checkentry,
+       .family         = AF_INET6,
        .me             = THIS_MODULE
 };
 
-static int __init init(void)
+static int __init xt_sctp_init(void)
 {
        int ret;
-       ret = xt_register_match(AF_INET, &sctp_match);
+       ret = xt_register_match(&sctp_match);
        if (ret)
                return ret;
 
-       ret = xt_register_match(AF_INET6, &sctp6_match);
+       ret = xt_register_match(&sctp6_match);
        if (ret)
-               xt_unregister_match(AF_INET, &sctp_match);
+               xt_unregister_match(&sctp_match);
 
        return ret;
 }
 
-static void __exit fini(void)
+static void __exit xt_sctp_fini(void)
 {
-       xt_unregister_match(AF_INET6, &sctp6_match);
-       xt_unregister_match(AF_INET, &sctp_match);
+       xt_unregister_match(&sctp6_match);
+       xt_unregister_match(&sctp_match);
 }
 
-module_init(init);
-module_exit(fini);
+module_init(xt_sctp_init);
+module_exit(xt_sctp_fini);