sctp: sctp should change socket state when shutdown is received
[deliverable/linux.git] / net / sctp / sm_sideeffect.c
index aa37122593684d8501fdca15983fbd8620fabe07..12d45193357cc7f1c7c14200dbda394d38a2af93 100644 (file)
@@ -806,8 +806,10 @@ static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds,
 
                /* Set the RCV_SHUTDOWN flag when a SHUTDOWN is received. */
                if (sctp_state(asoc, SHUTDOWN_RECEIVED) &&
-                   sctp_sstate(sk, ESTABLISHED))
+                   sctp_sstate(sk, ESTABLISHED)) {
+                       sk->sk_state = SCTP_SS_CLOSING;
                        sk->sk_shutdown |= RCV_SHUTDOWN;
+               }
        }
 
        if (sctp_state(asoc, COOKIE_WAIT)) {
This page took 0.024996 seconds and 5 git commands to generate.