]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: Fix ECN target TCP marking
authorPatrick McHardy <kaber@trash.net>
Sun, 21 Aug 2005 00:38:40 +0000 (17:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Aug 2005 00:38:40 +0000 (17:38 -0700)
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>
net/ipv4/netfilter/ipt_ECN.c

index ada9911118e9a7ec2ee841db8b3f250e48bfb71c..d3250a3a5db4455bd5344f7e8e0d60bb7794bea6 100644 (file)
@@ -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)))