aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/sctp/command.h2
-rw-r--r--net/sctp/sm_sideeffect.c2
-rw-r--r--net/sctp/sm_statefuns.c12
3 files changed, 9 insertions, 7 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 807d6f1ef4b5..dfe5d44b61ab 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -119,6 +119,7 @@ typedef union {
119 __u16 u16; 119 __u16 u16;
120 __u8 u8; 120 __u8 u8;
121 int error; 121 int error;
122 __be16 err;
122 sctp_state_t state; 123 sctp_state_t state;
123 sctp_event_timeout_t to; 124 sctp_event_timeout_t to;
124 unsigned long zero; 125 unsigned long zero;
@@ -167,6 +168,7 @@ SCTP_ARG_CONSTRUCTOR(U32, __u32, u32)
167SCTP_ARG_CONSTRUCTOR(U16, __u16, u16) 168SCTP_ARG_CONSTRUCTOR(U16, __u16, u16)
168SCTP_ARG_CONSTRUCTOR(U8, __u8, u8) 169SCTP_ARG_CONSTRUCTOR(U8, __u8, u8)
169SCTP_ARG_CONSTRUCTOR(ERROR, int, error) 170SCTP_ARG_CONSTRUCTOR(ERROR, int, error)
171SCTP_ARG_CONSTRUCTOR(PERR, __be16, err) /* protocol error */
170SCTP_ARG_CONSTRUCTOR(STATE, sctp_state_t, state) 172SCTP_ARG_CONSTRUCTOR(STATE, sctp_state_t, state)
171SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to) 173SCTP_ARG_CONSTRUCTOR(TO, sctp_event_timeout_t, to)
172SCTP_ARG_CONSTRUCTOR(PTR, void *, ptr) 174SCTP_ARG_CONSTRUCTOR(PTR, void *, ptr)
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 9c10bdec1afe..e4c43a3438db 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1360,7 +1360,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1360 break; 1360 break;
1361 1361
1362 case SCTP_CMD_INIT_FAILED: 1362 case SCTP_CMD_INIT_FAILED:
1363 sctp_cmd_init_failed(commands, asoc, cmd->obj.u32); 1363 sctp_cmd_init_failed(commands, asoc, cmd->obj.err);
1364 break; 1364 break;
1365 1365
1366 case SCTP_CMD_ASSOC_FAILED: 1366 case SCTP_CMD_ASSOC_FAILED:
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index b9063ed2a659..f462a227c7ae 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -2138,7 +2138,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep,
2138 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 2138 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
2139 SCTP_ERROR(ETIMEDOUT)); 2139 SCTP_ERROR(ETIMEDOUT));
2140 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 2140 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
2141 SCTP_U32(SCTP_ERROR_STALE_COOKIE)); 2141 SCTP_PERR(SCTP_ERROR_STALE_COOKIE));
2142 return SCTP_DISPOSITION_DELETE_TCB; 2142 return SCTP_DISPOSITION_DELETE_TCB;
2143 } 2143 }
2144 2144
@@ -2370,7 +2370,7 @@ static sctp_disposition_t sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
2370 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(sk_err)); 2370 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(sk_err));
2371 /* CMD_INIT_FAILED will DELETE_TCB. */ 2371 /* CMD_INIT_FAILED will DELETE_TCB. */
2372 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 2372 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
2373 SCTP_U32(error)); 2373 SCTP_PERR(error));
2374 return SCTP_DISPOSITION_ABORT; 2374 return SCTP_DISPOSITION_ABORT;
2375} 2375}
2376 2376
@@ -3743,7 +3743,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
3743 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3743 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3744 SCTP_ERROR(ECONNREFUSED)); 3744 SCTP_ERROR(ECONNREFUSED));
3745 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 3745 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
3746 SCTP_U32(SCTP_ERROR_PROTO_VIOLATION)); 3746 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3747 } else { 3747 } else {
3748 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3748 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3749 SCTP_ERROR(ECONNABORTED)); 3749 SCTP_ERROR(ECONNABORTED));
@@ -4199,7 +4199,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
4199 SCTP_ERROR(ECONNREFUSED)); 4199 SCTP_ERROR(ECONNREFUSED));
4200 /* Delete the established association. */ 4200 /* Delete the established association. */
4201 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 4201 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
4202 SCTP_U32(SCTP_ERROR_USER_ABORT)); 4202 SCTP_PERR(SCTP_ERROR_USER_ABORT));
4203 4203
4204 return retval; 4204 return retval;
4205} 4205}
@@ -4693,7 +4693,7 @@ sctp_disposition_t sctp_sf_t1_init_timer_expire(const struct sctp_endpoint *ep,
4693 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 4693 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
4694 SCTP_ERROR(ETIMEDOUT)); 4694 SCTP_ERROR(ETIMEDOUT));
4695 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 4695 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
4696 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4696 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4697 return SCTP_DISPOSITION_DELETE_TCB; 4697 return SCTP_DISPOSITION_DELETE_TCB;
4698 } 4698 }
4699 4699
@@ -4745,7 +4745,7 @@ sctp_disposition_t sctp_sf_t1_cookie_timer_expire(const struct sctp_endpoint *ep
4745 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 4745 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
4746 SCTP_ERROR(ETIMEDOUT)); 4746 SCTP_ERROR(ETIMEDOUT));
4747 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED, 4747 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
4748 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4748 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4749 return SCTP_DISPOSITION_DELETE_TCB; 4749 return SCTP_DISPOSITION_DELETE_TCB;
4750 } 4750 }
4751 4751