Balazs Scheidler 093d282321 tproxy: fix hash locking issue when using port redirection in __inet_inherit_port()
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.

Signed-off-by: KOVACS Krisztian <hidden@balabit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-21 13:06:43 +02:00
..
2010-09-02 10:12:06 -07:00
2010-09-08 21:45:01 -07:00
2010-02-22 16:20:22 -08:00
2010-09-10 12:32:02 -07:00
2010-08-19 00:08:30 -07:00
2010-07-12 12:57:54 -07:00
2010-06-28 23:24:29 -07:00
2010-08-24 14:45:09 -07:00
2010-02-22 16:20:22 -08:00
2010-06-30 13:31:19 -07:00
2010-08-19 00:08:30 -07:00
2010-06-26 22:00:03 -07:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:15 -08:00
2009-05-25 22:44:59 -07:00
2010-07-12 12:57:54 -07:00
2010-07-12 12:57:54 -07:00