Skip to content

Commit e343efc

Browse files
author
Sridhar Samudrala
committed
[SCTP] Fix poll() on a 1-1 style socket so that it returns when the
association is aborted by peer.
1 parent 985e146 commit e343efc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/sctp/sm_sideeffect.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands,
460460
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
461461
SCTP_STATE(SCTP_STATE_CLOSED));
462462

463+
/* Set sk_err to ECONNRESET on a 1-1 style socket. */
464+
if (!sctp_style(asoc->base.sk, UDP))
465+
asoc->base.sk->sk_err = ECONNRESET;
466+
463467
/* SEND_FAILED sent later when cleaning up the association. */
464468
asoc->outqueue.error = error;
465469
sctp_add_cmd_sf(commands, SCTP_CMD_DELETE_TCB, SCTP_NULL());

0 commit comments

Comments
 (0)