All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [NETFILTER 1/3]: Fix ECN target TCP marking
Date: Sat, 20 Aug 2005 03:39:55 +0200	[thread overview]
Message-ID: <430689EB.10103@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

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.


[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 1240 bytes --]

[NETFILTER]: Fix ECN target TCP marking

An incorrect check made it bail out before doing anything.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit a811712706846bff6ad796394ce4aa3abcc657b0
tree 58734ec94ba7a8d54accc29c5d986b242a2b5180
parent 97023145be4225d4b39c73264da10377982205ab
author Patrick McHardy <kaber@trash.net> Fri, 19 Aug 2005 08:51:18 +0200
committer Patrick McHardy <kaber@trash.net> Fri, 19 Aug 2005 08:51:18 +0200

 net/ipv4/netfilter/ipt_ECN.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
--- a/net/ipv4/netfilter/ipt_ECN.c
+++ b/net/ipv4/netfilter/ipt_ECN.c
@@ -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)))

                 reply	other threads:[~2005-08-20  1:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=430689EB.10103@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.