Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194928
b: refs/heads/master
c: 9f56731
h: refs/heads/master
v: v3
  • Loading branch information
Jan Engelhardt committed Mar 25, 2010
1 parent a7729db commit 4d9412b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7911b5c75b613f533b6cb6f999041dd5ea3bb004
refs/heads/master: 9f5673174161cc026a6c87f70d9b457e7ad82a80
10 changes: 7 additions & 3 deletions trunk/net/netfilter/xt_dccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,13 @@ static bool dccp_mt_check(const struct xt_mtchk_param *par)
{
const struct xt_dccp_info *info = par->matchinfo;

return !(info->flags & ~XT_DCCP_VALID_FLAGS)
&& !(info->invflags & ~XT_DCCP_VALID_FLAGS)
&& !(info->invflags & ~info->flags);
if (info->flags & ~XT_DCCP_VALID_FLAGS)
return false;
if (info->invflags & ~XT_DCCP_VALID_FLAGS)
return false;
if (info->invflags & ~info->flags)
return false;
return true;
}

static struct xt_match dccp_mt_reg[] __read_mostly = {
Expand Down
20 changes: 12 additions & 8 deletions trunk/net/netfilter/xt_sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,18 @@ static bool sctp_mt_check(const struct xt_mtchk_param *par)
{
const struct xt_sctp_info *info = par->matchinfo;

return !(info->flags & ~XT_SCTP_VALID_FLAGS)
&& !(info->invflags & ~XT_SCTP_VALID_FLAGS)
&& !(info->invflags & ~info->flags)
&& ((!(info->flags & XT_SCTP_CHUNK_TYPES)) ||
(info->chunk_match_type &
(SCTP_CHUNK_MATCH_ALL
| SCTP_CHUNK_MATCH_ANY
| SCTP_CHUNK_MATCH_ONLY)));
if (info->flags & ~XT_SCTP_VALID_FLAGS)
return false;
if (info->invflags & ~XT_SCTP_VALID_FLAGS)
return false;
if (info->invflags & ~info->flags)
return false;
if (!(info->flags & XT_SCTP_CHUNK_TYPES))
return true;
if (info->chunk_match_type & (SCTP_CHUNK_MATCH_ALL |
SCTP_CHUNK_MATCH_ANY | SCTP_CHUNK_MATCH_ONLY))
return true;
return false;
}

static struct xt_match sctp_mt_reg[] __read_mostly = {
Expand Down

0 comments on commit 4d9412b

Please sign in to comment.