From: "YU\, Haitao" Subject: Re: bugs in ftp conntrack Date: Fri, 25 May 2007 09:10:57 +0800 Message-ID: <380055457.11873@tsinghua.org.cn> Reply-To: "YU, Haitao" Content-Type: text/plain Cc: netfilter-devel@lists.netfilter.org To: "Patrick McHardy" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org In your mail: >From: Patrick McHardy >Reply-To: >To: "YU, Haitao" >Subject: Re: bugs in ftp conntrack >Date:Thu, 24 May 2007 20:16:05 +0200 > > >There's not much we can do about this case, we already keep a history >of sequence numbers. As you note below that code is pretty broken >currently, but I have patches queued to fix it (attached to this mail). > I think if it's possible that we don't record the new seqence of too new packets. "Too new packets" means the sequence of the packet is greater than all seq_aft_nl[] values. We just wait until another "port", "227", etc. packet is parsed correctly. So the return value of function find_nl_seq() shoule be three: 1: too new, then parse pattern, only if found > 0, then update seq, else keep current seq_aft_nl; 0: match one of the remembered seq, then parse pattern, update seq when found >= 0; -1: too old(less than all remembered seq), just goto out, (not goto out_update_nl) Thanks, YU, Haitao