netfilter: xtables: change matches to return error code
[deliverable/linux.git] / net / netfilter / xt_sctp.c
index 5037a7a0059c6ee273764929b226873aa59d2edd..c3694df5467273e29ab9891c7539a8116896a5b9 100644 (file)
@@ -149,17 +149,17 @@ static int sctp_mt_check(const struct xt_mtchk_param *par)
        const struct xt_sctp_info *info = par->matchinfo;
 
        if (info->flags & ~XT_SCTP_VALID_FLAGS)
-               return false;
+               return -EINVAL;
        if (info->invflags & ~XT_SCTP_VALID_FLAGS)
-               return false;
+               return -EINVAL;
        if (info->invflags & ~info->flags)
-               return false;
+               return -EINVAL;
        if (!(info->flags & XT_SCTP_CHUNK_TYPES))
-               return true;
+               return 0;
        if (info->chunk_match_type & (SCTP_CHUNK_MATCH_ALL |
            SCTP_CHUNK_MATCH_ANY | SCTP_CHUNK_MATCH_ONLY))
-               return true;
-       return false;
+               return 0;
+       return -EINVAL;
 }
 
 static struct xt_match sctp_mt_reg[] __read_mostly = {
This page took 0.031586 seconds and 5 git commands to generate.