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]: Don't checksum CHECKSUM_UNNECESSARY skbs in TCP connection tracking
Date: Tue, 03 May 2005 18:53:15 +0200	[thread overview]
Message-ID: <4277AC7B.6020600@trash.net> (raw)

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

TCP connection tracking incorrectly tries to verify the checksum of
CHECKSUM_UNNECESSARY packets. This causes packets on loopback to
be tracked as INVALID since we now drop the conntrack reference on
output and don't skip connection tracking on input anymore.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1163 bytes --]

[NETFILTER]: Don't checksum CHECKSUM_UNNECESSARY skbs in TCP connection tracking

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

---
commit 28b4b5756c08e6c4f053e6298c6cc176dd51cc9c
tree 37a577077717c6fc76b74317dd95502e3c0b0803
parent 480fc9b2802f2093e728567010506732e382b688
author Patrick McHardy <kaber@trash.net> 1115138945 +0200
committer Patrick McHardy <kaber@trash.net> 1115138945 +0200

Index: net/ipv4/netfilter/ip_conntrack_proto_tcp.c
===================================================================
--- 97b316503a4524074c05d5fb4cab63264690d0d6/net/ipv4/netfilter/ip_conntrack_proto_tcp.c  (mode:100644 sha1:2b87c1974be605d5bdb1ee769188d7e03fb2ddc8)
+++ 37a577077717c6fc76b74317dd95502e3c0b0803/net/ipv4/netfilter/ip_conntrack_proto_tcp.c  (mode:100644 sha1:721ddbf522b422d554479a7ab15c0955798f16ee)
@@ -819,6 +819,7 @@
 	 */
 	/* FIXME: Source route IP option packets --RR */
 	if (hooknum == NF_IP_PRE_ROUTING
+	    && skb->ip_summed != CHECKSUM_UNNECESSARY
 	    && csum_tcpudp_magic(iph->saddr, iph->daddr, tcplen, IPPROTO_TCP,
 			         skb->ip_summed == CHECKSUM_HW ? skb->csum
 			      	 : skb_checksum(skb, iph->ihl*4, tcplen, 0))) {

             reply	other threads:[~2005-05-03 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-03 16:53 Patrick McHardy [this message]
2005-05-03 21:23 ` [NETFILTER]: Don't checksum CHECKSUM_UNNECESSARY skbs in TCP connection tracking David S. Miller

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=4277AC7B.6020600@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.