aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_sctp.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-23 16:35:56 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 16:55:24 +0100
commitbd414ee605ff3ac5fcd79f57269a897879ee4cde (patch)
tree3cff5d1f3fd43791341e9cde23dabb4dfbc94bd3 /net/netfilter/xt_sctp.c
parentnetfilter: xtables: change xt_target.checkentry return type (diff)
downloadlinux-dev-bd414ee605ff3ac5fcd79f57269a897879ee4cde.tar.xz
linux-dev-bd414ee605ff3ac5fcd79f57269a897879ee4cde.zip
netfilter: xtables: change matches to return error code
The following semantic patch does part of the transformation: // <smpl> @ rule1 @ struct xt_match ops; identifier check; @@ ops.checkentry = check; @@ identifier rule1.check; @@ check(...) { <... -return true; +return 0; ...> } @@ identifier rule1.check; @@ check(...) { <... -return false; +return -EINVAL; ...> } // </smpl> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter/xt_sctp.c')
-rw-r--r--net/netfilter/xt_sctp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c
index 5037a7a0059c..c3694df54672 100644
--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -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 = {