From: "Julius Volz" Subject: Re: Getting IPVS and Netfilter SNAT to play together Date: Tue, 23 Sep 2008 15:54:09 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: netfilter-devel@vger.kernel.org, "Simon Horman" , "Joseph Mack NA3T" To: "Jan Engelhardt" Return-path: Received: from smtp-out.google.com ([216.239.33.17]:32828 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755192AbYIWNyS (ORCPT ); Tue, 23 Sep 2008 09:54:18 -0400 Received: from spaceape9.eur.corp.google.com (spaceape9.eur.corp.google.com [172.28.16.143]) by smtp-out.google.com with ESMTP id m8NDsB1j027541 for ; Tue, 23 Sep 2008 14:54:11 +0100 Received: from ug-out-1314.google.com (ugfk3.prod.google.com [10.66.187.3]) by spaceape9.eur.corp.google.com with ESMTP id m8NDs9Z2017754 for ; Tue, 23 Sep 2008 06:54:10 -0700 Received: by ug-out-1314.google.com with SMTP id k3so2000627ugf.5 for ; Tue, 23 Sep 2008 06:54:09 -0700 (PDT) In-Reply-To: Content-Disposition: inline Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Tue, Sep 23, 2008 at 3:21 PM, Jan Engelhardt wrote: > > On Tuesday 2008-09-23 09:13, Julius Volz wrote: >> >>Ok, the SYN/ACK from the backend is logged as --cstate INVALID in >>PREROUTING and INPUT. This means that Netfilter thinks it doesn't >>belong to any connection, although it just SNATed the SYN to the >>backend correctly? Hmm... how can this be? > > That probably means skb->nfct is lost (set to NULL, which is what INVALID > indicates) after SNAT (PREROUTING), when IPVS kicks in. But at PREROUTING, the skb hasn't seen any part of IPVS yet. And the prior SNAT for the SYN packet happened in POSTROUTING after all of IPVS was finished. Basically, there should be no IPVS involved from the time that the SYN is correctly SNATed and the time that the SYN/ACK is not. Please correct me if I'm missing something here... Julius -- Julius Volz - Corporate Operations - SysOps Google Switzerland GmbH - Identification No.: CH-020.4.028.116-1