netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: KOVACS Krisztian <hidden@balabit.hu>
Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	David Miller <davem@davemloft.net>
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	[thread overview]
Message-ID: <4CC01F16.2000008@trash.net> (raw)
In-Reply-To: <20101020112142.6538.40476.stgit@este.odu>

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 <stephen.buck@exinda.com>.
> See http://marc.info/?t=128169268200001&r=1&w=2 for the original discussion.

Applied, thanks.

  reply	other threads:[~2010-10-21 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20 11:21 [PATCH 0/3] tproxy fixes for current upstream code KOVACS Krisztian
2010-10-20 11:21 ` [PATCH 3/3] tproxy: fix hash locking issue when using port redirection in __inet_inherit_port() KOVACS Krisztian
2010-10-21 11:08   ` Patrick McHardy [this message]
2010-10-20 11:21 ` [PATCH 2/3] tproxy: add lookup type checks for UDP in nf_tproxy_get_sock_v4() KOVACS Krisztian
2010-10-21 10:48   ` Patrick McHardy
2010-10-20 11:21 ` [PATCH 1/3] tproxy: kick out TIME_WAIT sockets in case a new connection comes in with the same tuple KOVACS Krisztian
2010-10-21 10:45   ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC01F16.2000008@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=hidden@balabit.hu \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).