netfilter: tproxy: properly refcount tcp listeners
authorEric Dumazet <edumazet@google.com>
Wed, 17 Aug 2016 16:56:46 +0000 (09:56 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 17 Aug 2016 22:51:13 +0000 (00:51 +0200)
commitdcbe35909c8426e1ace74b4b99c4cb403cdaca89
tree23e69e6646920b3c7a14db09d3db696e83922708
parentaca300183ed4f723837f6619facff0890c46d313
netfilter: tproxy: properly refcount tcp listeners

inet_lookup_listener() and inet6_lookup_listener() no longer
take a reference on the found listener.

This minimal patch adds back the refcounting, but we might do
this differently in net-next later.

Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood")
Reported-and-tested-by: Denys Fedoryshchenko <nuclearcat@nuclearcat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_TPROXY.c