Skip to contentSkip to conversation

: Fix ECN target TCP marking

PATCH In review Patrick McHardy 1 participant 1 message Aug 20, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 : Fix ECN target TCP marking

Hi Dave,

these patches fix HW checksum handling in the ECN and TCPMSS target. The second and third patch don't apply to both net-2.6 and net-2.6.14 because of the nfcache removal and renaming of skb_ip_make_writable, I've attached one patch for each tree.

[NETFILTER]: Fix ECN target TCP marking

An incorrect check made it bail out before doing anything.

---
commit a811712706846bff6ad796394ce4aa3abcc657b0
tree 58734ec94ba7a8d54accc29c5d986b242a2b5180
parent 97023145be4225d4b39c73264da10377982205ab
author Patrick McHardy <[email protected]> Fri, 19 Aug 2005 08:51:18 +0200 committer Patrick McHardy <[email protected]> Fri, 19 Aug 2005 08:51:18 +0200

 net/ipv4/netfilter/ipt_ECN.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
net/ipv4/netfilter/ipt_ECN.c +4 -4
@@ -60,10 +60,10 @@ set_ect_tcp(struct sk_buff **pskb, const
 	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_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph)))