diff options
Diffstat (limited to 'net/netfilter/xt_sctp.c')
-rw-r--r-- | net/netfilter/xt_sctp.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index 43c7e1de532..977b182dea5 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -148,14 +148,18 @@ static bool sctp_mt_check(const struct xt_mtchk_param *par) | |||
148 | { | 148 | { |
149 | const struct xt_sctp_info *info = par->matchinfo; | 149 | const struct xt_sctp_info *info = par->matchinfo; |
150 | 150 | ||
151 | return !(info->flags & ~XT_SCTP_VALID_FLAGS) | 151 | if (info->flags & ~XT_SCTP_VALID_FLAGS) |
152 | && !(info->invflags & ~XT_SCTP_VALID_FLAGS) | 152 | return false; |
153 | && !(info->invflags & ~info->flags) | 153 | if (info->invflags & ~XT_SCTP_VALID_FLAGS) |
154 | && ((!(info->flags & XT_SCTP_CHUNK_TYPES)) || | 154 | return false; |
155 | (info->chunk_match_type & | 155 | if (info->invflags & ~info->flags) |
156 | (SCTP_CHUNK_MATCH_ALL | 156 | return false; |
157 | | SCTP_CHUNK_MATCH_ANY | 157 | if (!(info->flags & XT_SCTP_CHUNK_TYPES)) |
158 | | SCTP_CHUNK_MATCH_ONLY))); | 158 | return true; |
159 | if (info->chunk_match_type & (SCTP_CHUNK_MATCH_ALL | | ||
160 | SCTP_CHUNK_MATCH_ANY | SCTP_CHUNK_MATCH_ONLY)) | ||
161 | return true; | ||
162 | return false; | ||
159 | } | 163 | } |
160 | 164 | ||
161 | static struct xt_match sctp_mt_reg[] __read_mostly = { | 165 | static struct xt_match sctp_mt_reg[] __read_mostly = { |