[NETFILTER]: Convert x_tables matches/targets to centralized error checking
[deliverable/linux.git] / net / netfilter / xt_comment.c
index 4ba6fd65c6e9319a6be5b4eb321cd6a600e72f3b..b3f07aa593f4f8f1cd8ea77b3b30b7e4a4d3704a 100644 (file)
@@ -28,30 +28,17 @@ match(const struct sk_buff *skb,
        return 1;
 }
 
-static int
-checkentry(const char *tablename,
-           const void *ip,
-           void *matchinfo,
-           unsigned int matchsize,
-           unsigned int hook_mask)
-{
-       /* Check the size */
-       if (matchsize != XT_ALIGN(sizeof(struct xt_comment_info)))
-               return 0;
-       return 1;
-}
-
 static struct xt_match comment_match = {
        .name           = "comment",
        .match          = match,
-       .checkentry     = checkentry,
+       .matchsize      = sizeof(struct xt_comment_info),
        .me             = THIS_MODULE
 };
 
 static struct xt_match comment6_match = {
        .name           = "comment",
        .match          = match,
-       .checkentry     = checkentry,
+       .matchsize      = sizeof(struct xt_comment_info),
        .me             = THIS_MODULE
 };
 
This page took 0.024643 seconds and 5 git commands to generate.