From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: Checksum problem in tcp-window-tracking Date: Tue, 15 Jun 2004 20:32:19 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <40CF40B3.7040109@trash.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Martin Josefsson , Netfilter-devel Return-path: To: Jozsef Kadlecsik In-Reply-To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Hi Jozsef, Jozsef Kadlecsik wrote: > I committed the fixed version of the patch in cvs. Besides the fix the > talkative log messages were trimmed in order to fit (better) into the > ULOG buffer. I think there is still a problem. + if (csum_tcpudp_magic(iph->saddr, iph->daddr, + tcplen, IPPROTO_TCP, + skb->ip_summed == CHECKSUM_HW + && hooknum == NF_IP_PRE_ROUTING + ? skb->csum + : skb_checksum(skb, iph->ihl*4, tcplen, 0))) { On the outgoing path, the NIC is supposed to checksum the packet when CHECKSUM_HW is set, so it hasn't got a valid checksum when the check is performed. Do we need to check the checksum in LOCAL_OUT at all ? Other than from raw-sockets, invalid packets can not occur. Regards Patrick PS: Martin, how did you trigger these errors ?