aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_dccp.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-23 12:40:13 -0400
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 11:03:12 -0400
commit9f5673174161cc026a6c87f70d9b457e7ad82a80 (patch)
treec0f763f86b93a476837193c4621f431960745ff1 /net/netfilter/xt_dccp.c
parent7911b5c75b613f533b6cb6f999041dd5ea3bb004 (diff)
netfilter: xtables: untangle spaghetti if clauses in checkentry
As I'm changing the return values soon, I want to have a clear visual path. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter/xt_dccp.c')
-rw-r--r--net/netfilter/xt_dccp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c
index 0989f29ade2..8f6014f7c88 100644
--- a/net/netfilter/xt_dccp.c
+++ b/net/netfilter/xt_dccp.c
@@ -127,9 +127,13 @@ static bool dccp_mt_check(const struct xt_mtchk_param *par)
127{ 127{
128 const struct xt_dccp_info *info = par->matchinfo; 128 const struct xt_dccp_info *info = par->matchinfo;
129 129
130 return !(info->flags & ~XT_DCCP_VALID_FLAGS) 130 if (info->flags & ~XT_DCCP_VALID_FLAGS)
131 && !(info->invflags & ~XT_DCCP_VALID_FLAGS) 131 return false;
132 && !(info->invflags & ~info->flags); 132 if (info->invflags & ~XT_DCCP_VALID_FLAGS)
133 return false;
134 if (info->invflags & ~info->flags)
135 return false;
136 return true;
133} 137}
134 138
135static struct xt_match dccp_mt_reg[] __read_mostly = { 139static struct xt_match dccp_mt_reg[] __read_mostly = {