aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 20:01:06 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:26:21 -0500
commit5be291fe2d0d76681190589f6480ce1e28c2406b (patch)
tree49239166a06dc68606de93803120e2724858a813 /net/sctp
parentdc251b2b1c4bfea51903cb9fbc141a5b33f6aca7 (diff)
[SCTP]: SCTP_CMD_ASSOC_FAILED annotations.
also always get __be16 protocol error; switch to SCTP_PERR() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/sm_sideeffect.c2
-rw-r--r--net/sctp/sm_statefuns.c24
2 files changed, 13 insertions, 13 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index e4c43a3438db..2423b8ef9ce0 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1365,7 +1365,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1365 1365
1366 case SCTP_CMD_ASSOC_FAILED: 1366 case SCTP_CMD_ASSOC_FAILED:
1367 sctp_cmd_assoc_failed(commands, asoc, event_type, 1367 sctp_cmd_assoc_failed(commands, asoc, event_type,
1368 subtype, chunk, cmd->obj.u32); 1368 subtype, chunk, cmd->obj.err);
1369 break; 1369 break;
1370 1370
1371 case SCTP_CMD_INIT_COUNTER_INC: 1371 case SCTP_CMD_INIT_COUNTER_INC:
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index f462a227c7ae..b70e3258b6d3 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -886,7 +886,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
886 SCTP_ERROR(ETIMEDOUT)); 886 SCTP_ERROR(ETIMEDOUT));
887 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ 887 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
888 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 888 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
889 SCTP_U32(SCTP_ERROR_NO_ERROR)); 889 SCTP_PERR(SCTP_ERROR_NO_ERROR));
890 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 890 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
891 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 891 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
892 return SCTP_DISPOSITION_DELETE_TCB; 892 return SCTP_DISPOSITION_DELETE_TCB;
@@ -2250,7 +2250,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
2250{ 2250{
2251 struct sctp_chunk *chunk = arg; 2251 struct sctp_chunk *chunk = arg;
2252 unsigned len; 2252 unsigned len;
2253 __u16 error = SCTP_ERROR_NO_ERROR; 2253 __be16 error = SCTP_ERROR_NO_ERROR;
2254 2254
2255 if (!sctp_vtag_verify_either(chunk, asoc)) 2255 if (!sctp_vtag_verify_either(chunk, asoc))
2256 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 2256 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
@@ -2275,7 +2275,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
2275 2275
2276 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET)); 2276 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, SCTP_ERROR(ECONNRESET));
2277 /* ASSOC_FAILED will DELETE_TCB. */ 2277 /* ASSOC_FAILED will DELETE_TCB. */
2278 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, SCTP_U32(error)); 2278 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, SCTP_PERR(error));
2279 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 2279 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
2280 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 2280 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
2281 2281
@@ -3360,7 +3360,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3360 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3360 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3361 SCTP_ERROR(ECONNABORTED)); 3361 SCTP_ERROR(ECONNABORTED));
3362 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3362 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3363 SCTP_U32(SCTP_ERROR_ASCONF_ACK)); 3363 SCTP_PERR(SCTP_ERROR_ASCONF_ACK));
3364 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3364 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
3365 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 3365 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
3366 return SCTP_DISPOSITION_ABORT; 3366 return SCTP_DISPOSITION_ABORT;
@@ -3388,7 +3388,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3388 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3388 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3389 SCTP_ERROR(ECONNABORTED)); 3389 SCTP_ERROR(ECONNABORTED));
3390 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3390 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3391 SCTP_U32(SCTP_ERROR_ASCONF_ACK)); 3391 SCTP_PERR(SCTP_ERROR_ASCONF_ACK));
3392 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3392 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
3393 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 3393 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
3394 return SCTP_DISPOSITION_ABORT; 3394 return SCTP_DISPOSITION_ABORT;
@@ -3748,7 +3748,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
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));
3750 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3750 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3751 SCTP_U32(SCTP_ERROR_PROTO_VIOLATION)); 3751 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3752 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 3752 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
3753 } 3753 }
3754 3754
@@ -4062,7 +4062,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
4062 SCTP_ERROR(ECONNABORTED)); 4062 SCTP_ERROR(ECONNABORTED));
4063 /* Delete the established association. */ 4063 /* Delete the established association. */
4064 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 4064 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
4065 SCTP_U32(SCTP_ERROR_USER_ABORT)); 4065 SCTP_PERR(SCTP_ERROR_USER_ABORT));
4066 4066
4067 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 4067 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
4068 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 4068 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
@@ -4571,7 +4571,7 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(const struct sctp_endpoint *ep,
4571 SCTP_ERROR(ETIMEDOUT)); 4571 SCTP_ERROR(ETIMEDOUT));
4572 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ 4572 /* CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
4573 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 4573 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
4574 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4574 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4575 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 4575 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
4576 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 4576 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
4577 return SCTP_DISPOSITION_DELETE_TCB; 4577 return SCTP_DISPOSITION_DELETE_TCB;
@@ -4781,7 +4781,7 @@ sctp_disposition_t sctp_sf_t2_timer_expire(const struct sctp_endpoint *ep,
4781 SCTP_ERROR(ETIMEDOUT)); 4781 SCTP_ERROR(ETIMEDOUT));
4782 /* Note: CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */ 4782 /* Note: CMD_ASSOC_FAILED calls CMD_DELETE_TCB. */
4783 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 4783 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
4784 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4784 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4785 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 4785 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
4786 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 4786 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
4787 return SCTP_DISPOSITION_DELETE_TCB; 4787 return SCTP_DISPOSITION_DELETE_TCB;
@@ -4859,7 +4859,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire(
4859 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 4859 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
4860 SCTP_ERROR(ETIMEDOUT)); 4860 SCTP_ERROR(ETIMEDOUT));
4861 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 4861 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
4862 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4862 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4863 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 4863 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
4864 SCTP_INC_STATS(SCTP_MIB_CURRESTAB); 4864 SCTP_INC_STATS(SCTP_MIB_CURRESTAB);
4865 return SCTP_DISPOSITION_ABORT; 4865 return SCTP_DISPOSITION_ABORT;
@@ -4915,7 +4915,7 @@ sctp_disposition_t sctp_sf_t5_timer_expire(const struct sctp_endpoint *ep,
4915 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 4915 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
4916 SCTP_ERROR(ETIMEDOUT)); 4916 SCTP_ERROR(ETIMEDOUT));
4917 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 4917 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
4918 SCTP_U32(SCTP_ERROR_NO_ERROR)); 4918 SCTP_PERR(SCTP_ERROR_NO_ERROR));
4919 4919
4920 return SCTP_DISPOSITION_DELETE_TCB; 4920 return SCTP_DISPOSITION_DELETE_TCB;
4921nomem: 4921nomem:
@@ -5365,7 +5365,7 @@ static int sctp_eat_data(const struct sctp_association *asoc,
5365 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 5365 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
5366 SCTP_ERROR(ECONNABORTED)); 5366 SCTP_ERROR(ECONNABORTED));
5367 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 5367 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
5368 SCTP_U32(SCTP_ERROR_NO_DATA)); 5368 SCTP_PERR(SCTP_ERROR_NO_DATA));
5369 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 5369 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
5370 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 5370 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
5371 return SCTP_IERROR_NO_DATA; 5371 return SCTP_IERROR_NO_DATA;