aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/ip6t_hbh.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/ipv6/netfilter/ip6t_hbh.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/ipv6/netfilter/ip6t_hbh.c')
-rw-r--r--net/ipv6/netfilter/ip6t_hbh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index 1b294317707b..5e6acdae6d80 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -170,15 +170,15 @@ static int hbh_mt6_check(const struct xt_mtchk_param *par)
if (optsinfo->invflags & ~IP6T_OPTS_INV_MASK) {
pr_debug("unknown flags %X\n", optsinfo->invflags);
- return false;
+ return -EINVAL;
}
if (optsinfo->flags & IP6T_OPTS_NSTRICT) {
pr_debug("Not strict - not implemented");
- return false;
+ return -EINVAL;
}
- return true;
+ return 0;
}
static struct xt_match hbh_mt6_reg[] __read_mostly = {