Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279113
b: refs/heads/master
c: 42c344a
h: refs/heads/master
i:
  279111: a74c614
v: v3
  • Loading branch information
Jan Engelhardt authored and Pablo Neira Ayuso committed Dec 27, 2011
1 parent 04183dd commit 9dd9426
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: af0d29cd2a732f70882e6122b9f9df8b0d84515e
refs/heads/master: 42c344a3bc6bb2eb4c0bef98d24d53adda255154
15 changes: 6 additions & 9 deletions trunk/net/netfilter/xt_ecn.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ static bool match_tcp(const struct sk_buff *skb, struct xt_action_param *par)
* be good citizens.
*/
th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph);
if (th == NULL) {
if (th == NULL)
return false;
}

if (einfo->operation & XT_ECN_OP_MATCH_ECE) {
if (einfo->invert & XT_ECN_OP_MATCH_ECE) {
Expand Down Expand Up @@ -75,14 +74,12 @@ static bool ecn_mt4(const struct sk_buff *skb, struct xt_action_param *par)
{
const struct xt_ecn_info *info = par->matchinfo;

if (info->operation & XT_ECN_OP_MATCH_IP)
if (!match_ip(skb, info))
return false;
if (info->operation & XT_ECN_OP_MATCH_IP && !match_ip(skb, info))
return false;

if (info->operation & (XT_ECN_OP_MATCH_ECE | XT_ECN_OP_MATCH_CWR)) {
if (!match_tcp(skb, par))
return false;
}
if (info->operation & (XT_ECN_OP_MATCH_ECE | XT_ECN_OP_MATCH_CWR) &&
!match_tcp(skb, par))
return false;

return true;
}
Expand Down

0 comments on commit 9dd9426

Please sign in to comment.