[DCCP]: Support for server holding timewait state
[deliverable/linux.git] / net / dccp / output.c
index e97584aa489881b33881e4e7da78441ab4634ad7..b2e17910930dab5b5b0d8e327322551e75635f32 100644 (file)
@@ -567,8 +567,10 @@ void dccp_send_close(struct sock *sk, const int active)
 
        /* Reserve space for headers and prepare control bits. */
        skb_reserve(skb, sk->sk_prot->max_header);
-       DCCP_SKB_CB(skb)->dccpd_type = dp->dccps_role == DCCP_ROLE_CLIENT ?
-                                       DCCP_PKT_CLOSE : DCCP_PKT_CLOSEREQ;
+       if (dp->dccps_role == DCCP_ROLE_SERVER && !dp->dccps_server_timewait)
+               DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSEREQ;
+       else
+               DCCP_SKB_CB(skb)->dccpd_type = DCCP_PKT_CLOSE;
 
        if (active) {
                dccp_write_xmit(sk, 1);
This page took 0.038772 seconds and 5 git commands to generate.