Skip to contentSkip to conversation

Entirely ignoring TCP and UDP checksum in kernel level

DISCUSSION Lee Revell 2 participants 2 messages Aug 21, 2004 1 message not in the archive

lore
Share & tools
lore

Lee Revell

author
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · Josan Kadett

Here is the very original linux-kernel mailing list, and if I cannot find an answer here, then nowhere on earth can this answer be found. I also saw some other messages regarding the same issue on the net. None of them is answered correctly; and also as if this is a very "forbidden" thing to disable the checksums, most replies are as if they are "unbreakable rules of god". Really, I am losing my patience with this. It is also very odd to write a low-level application in order to just disable a "feature" of the kernel to deal with a faulty piece of embedded firmware.

Try this. I have no idea whether it will work. If it breaks you get to keep both halves.

ipv4/tcp_input.c-new renamed from ipv4/tcp_input.c +2 -3
@@ -4234,8 +4234,7 @@
 				}
 			}
 			if (!eaten) {
-				if (tcp_checksum_complete_user(sk, skb))
-					goto csum_error;
+				tcp_checksum_complete_user(sk, skb);
 
 				/* Predicted packet is in window by definition.
 				 * seq == rcv_nxt and rcv_wup <= rcv_nxt.
@@ -4291,7 +4290,7 @@
 
 slow_path:
 	if (len < (th->doff<<2) || tcp_checksum_complete_user(sk, skb))
-		goto csum_error;
+		;
 
 	/*
 	 * RFC1323: H1. Apply PAWS check first.

Lee

#2 lore raw

I added the patch, indeed this was just one of the few modifications I tried before. The result is failure, the TCP/IP stack still does the checksum... Perhaps after this modification, the condition that the packet is not "eaten" may not be telling the system that there is a checksum error, but instead, just dropping packets by not igniting the TCP ACK function.

-----Original Message-----
From: Lee Revell [mailto:[email protected]]
Sent: Saturday, August 21, 2004 10:58 AM
To: Josan Kadett
Cc: linux-kernel
Subject: RE: Entirely ignoring TCP and UDP checksum in kernel level

Quoted 1 line · Josan Kadett

Here is the very original linux-kernel mailing list, and if I cannot find

an

Quoted 1 line

answer here, then nowhere on earth can this answer be found. I also saw

some

Quoted 1 line

other messages regarding the same issue on the net. None of them is

answered

Quoted 4 lines

correctly; and also as if this is a very "forbidden" thing to disable the checksums, most replies are as if they are "unbreakable rules of god". Really, I am losing my patience with this. It is also very odd to write a low-level application in order to just disable a "feature" of the kernel

to

Quoted 2 lines

deal with a faulty piece of embedded firmware.

Try this. I have no idea whether it will work. If it breaks you get to keep both halves.

ipv4/tcp_input.c-new renamed from ipv4/tcp_input.c +1 -2
@@ -4234,8 +4234,7 @@
 				}
 			}
 			if (!eaten) {
-				if (tcp_checksum_complete_user(sk, skb))
-					goto csum_error;
+				tcp_checksum_complete_user(sk, skb);
 
 				/* Predicted packet is in window by

definition.
* seq == rcv_nxt and rcv_wup <= rcv_nxt.
@@ -4291,7 +4290,7 @@

slow_path:
if (len < (th->doff<<2) || tcp_checksum_complete_user(sk, skb))
- goto csum_error;
+ ;

/*
* RFC1323: H1. Apply PAWS check first.

Lee