Skip to contentSkip to conversation

: Don't checksum CHECKSUM_UNNECESSARY skbs in TCP connection tracking

NETFILTER Applied Patrick McHardy 2 participants 2 messages May 3, 2005

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

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.

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

---
commit 28b4b5756c08e6c4f053e6298c6cc176dd51cc9c tree 37a577077717c6fc76b74317dd95502e3c0b0803 parent 480fc9b2802f2093e728567010506732e382b688 author Patrick McHardy <[email protected]> 1115138945 +0200 committer Patrick McHardy <[email protected]> 1115138945 +0200

net/ipv4/netfilter/ip_conntrack_proto_tcp.c (mode:100644 sha1:721ddbf522b422d554479a7ab15c0955798f16ee) renamed from net/ipv4/netfilter/ip_conntrack_proto_tcp.c (mode:100644 sha1:2b87c1974be605d5bdb1ee769188d7e03fb2ddc8) +1 -0
Index: net/ipv4/netfilter/ip_conntrack_proto_tcp.c
===================================================================
@@ -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))) {
maintainer Applied
#1 lore raw
Quoted 4 lines · On Tue, 03 May 2005 18:53:15 +0200 Patrick McHardy <[email protected]> wrote:

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.

Applied, thanks.