]> git.hungrycats.org Git - linux/commitdiff
[SCTP] Fix poll() on a 1-1 style socket so that it returns when the
authorSridhar Samudrala <sri@us.ibm.com>
Thu, 3 Jun 2004 10:46:29 +0000 (03:46 -0700)
committerSridhar Samudrala <sri@us.ibm.com>
Thu, 3 Jun 2004 10:46:29 +0000 (03:46 -0700)
association is aborted by peer.

net/sctp/sm_sideeffect.c

index 4842c1ef5986f53f1010208cffaf441b473d5743..83cee2acd917647c2ff6da2d8babda04c986fccb 100644 (file)
@@ -460,6 +460,10 @@ static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands,
        sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
                        SCTP_STATE(SCTP_STATE_CLOSED));
 
+       /* Set sk_err to ECONNRESET on a 1-1 style socket. */
+       if (!sctp_style(asoc->base.sk, UDP))
+               asoc->base.sk->sk_err = ECONNRESET; 
+
        /* SEND_FAILED sent later when cleaning up the association. */
        asoc->outqueue.error = error;
        sctp_add_cmd_sf(commands, SCTP_CMD_DELETE_TCB, SCTP_NULL());