From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 3/3] tproxy: fix hash locking issue when using port redirection in __inet_inherit_port() Date: Thu, 21 Oct 2010 13:08:06 +0200 Message-ID: <4CC01F16.2000008@trash.net> References: <20101020112142.6538.25550.stgit@este.odu> <20101020112142.6538.40476.stgit@este.odu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, David Miller To: KOVACS Krisztian Return-path: Received: from stinky.trash.net ([213.144.137.162]:54776 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757078Ab0JULIO (ORCPT ); Thu, 21 Oct 2010 07:08:14 -0400 In-Reply-To: <20101020112142.6538.40476.stgit@este.odu> Sender: netfilter-devel-owner@vger.kernel.org List-ID: Am 20.10.2010 13:21, schrieb KOVACS Krisztian: > When __inet_inherit_port() is called on a tproxy connection the wrong locks are > held for the inet_bind_bucket it is added to. __inet_inherit_port() made an > implicit assumption that the listener's port number (and thus its bind bucket). > Unfortunately, if you're using the TPROXY target to redirect skbs to a > transparent proxy that assumption is not true anymore and things break. > > This patch adds code to __inet_inherit_port() so that it can handle this case > by looking up or creating a new bind bucket for the child socket and updates > callers of __inet_inherit_port() to gracefully handle __inet_inherit_port() > failing. > > Reported by and original patch from Stephen Buck . > See http://marc.info/?t=128169268200001&r=1&w=2 for the original discussion. Applied, thanks.