summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_tproxy_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netfilter/nf_tproxy_core.c')
-rw-r--r--net/netfilter/nf_tproxy_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/netfilter/nf_tproxy_core.c b/net/netfilter/nf_tproxy_core.c
index 5490fc3..daab8c4 100644
--- a/net/netfilter/nf_tproxy_core.c
+++ b/net/netfilter/nf_tproxy_core.c
@@ -70,7 +70,11 @@ nf_tproxy_destructor(struct sk_buff *skb)
int
nf_tproxy_assign_sock(struct sk_buff *skb, struct sock *sk)
{
- if (inet_sk(sk)->transparent) {
+ bool transparent = (sk->sk_state == TCP_TIME_WAIT) ?
+ inet_twsk(sk)->tw_transparent :
+ inet_sk(sk)->transparent;
+
+ if (transparent) {
skb_orphan(skb);
skb->sk = sk;
skb->destructor = nf_tproxy_destructor;
OpenPOWER on IntegriCloud