nf: qtaguid: workaround xt_socket_get_sk() returning bad SKs.
authorJP Abgrall <jpa@google.com>
Tue, 28 Jun 2011 04:03:04 +0000 (21:03 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:09:19 +0000 (12:09 -0800)
commit523fa167e89783342dfc2f4b751b82499bc3c01e
tree8fc59cc83fddc59aaab5bc34af786940c1370933
parentd6210a35c0a8e26fc0376ae4cb6d40204f63be40
nf: qtaguid: workaround xt_socket_get_sk() returning bad SKs.

(This is a direct cherry pick from 2.6.39: Id2a9912b)

* xt_socket_get_sk() returns invalid sockets when the sk_state is TCP_TIME_WAIT.
Added detection of time-wait.
* Added more constrained usage: qtaguid insures that xt_socket_get*_sk() is
not invoked for unexpected hooks or protocols (but I have not seen those
active at the point where the returned sk is bad).

Signed-off-by: JP Abgrall <jpa@google.com>
Change-Id: Id2a9912bb451a3e59d012fc55bbbd40fbb90693f
net/netfilter/xt_qtaguid.c