Skip to content

Commit

Permalink
[NETFILTER]: Fix ECN target TCP marking
Browse files Browse the repository at this point in the history
An incorrect check made it bail out before doing anything.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 21, 2005
1 parent a5ea169 commit fd84132
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/ipv4/netfilter/ipt_ECN.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
if (!tcph)
return 0;

if (!(einfo->operation & IPT_ECN_OP_SET_ECE
|| tcph->ece == einfo->proto.tcp.ece)
&& (!(einfo->operation & IPT_ECN_OP_SET_CWR
|| tcph->cwr == einfo->proto.tcp.cwr)))
if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) ||
tcph->ece == einfo->proto.tcp.ece) &&
((!(einfo->operation & IPT_ECN_OP_SET_CWR) ||
tcph->cwr == einfo->proto.tcp.cwr)))
return 1;

if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph)))
Expand Down

0 comments on commit fd84132

Please sign in to comment.