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)
committerJP Abgrall <jpa@google.com>
Tue, 28 Jun 2011 07:04:05 +0000 (00:04 -0700)
commit35b86285c21a55463018c12d5336a8e47ccabd1e
tree2c9ad18a0df0e7acbb669899a0ac069fb77bfcc2
parentfa0f10bee3e30bca9cdc70139e5186e2be44158b
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