RE: Entirely ignoring TCP and UDP checksum in kernel level

From: Josan Kadett
Date: Sat Aug 21 2004 - 15:46:31 EST




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:rlrevell@xxxxxxxxxxx]
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

On Sat, 2004-08-21 at 05:50, Josan Kadett wrote:
> 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.

--- net/ipv4/tcp_input.c 2004-08-20 16:37:12.000000000 -0400
+++ net/ipv4/tcp_input.c-new 2004-08-21 04:56:51.000000000 -0400
@@ -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




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/