aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statefuns.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r--net/sctp/sm_statefuns.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index fbbc9e6a3b78..b3cad8a03736 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -189,7 +189,7 @@ sctp_disposition_t sctp_sf_do_4_C(const struct sctp_endpoint *ep,
189 0, 0, 0, GFP_ATOMIC); 189 0, 0, 0, GFP_ATOMIC);
190 if (ev) 190 if (ev)
191 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, 191 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP,
192 SCTP_ULPEVENT(ev)); 192 SCTP_ULPEVENT(ev));
193 193
194 /* Upon reception of the SHUTDOWN COMPLETE chunk the endpoint 194 /* Upon reception of the SHUTDOWN COMPLETE chunk the endpoint
195 * will verify that it is in SHUTDOWN-ACK-SENT state, if it is 195 * will verify that it is in SHUTDOWN-ACK-SENT state, if it is
@@ -228,7 +228,7 @@ sctp_disposition_t sctp_sf_do_4_C(const struct sctp_endpoint *ep,
228 * Verification Tag field to Tag_A, and also provide its own 228 * Verification Tag field to Tag_A, and also provide its own
229 * Verification Tag (Tag_Z) in the Initiate Tag field. 229 * Verification Tag (Tag_Z) in the Initiate Tag field.
230 * 230 *
231 * Verification Tag: Must be 0. 231 * Verification Tag: Must be 0.
232 * 232 *
233 * Inputs 233 * Inputs
234 * (endpoint, asoc, chunk) 234 * (endpoint, asoc, chunk)
@@ -256,7 +256,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep,
256 /* 6.10 Bundling 256 /* 6.10 Bundling
257 * An endpoint MUST NOT bundle INIT, INIT ACK or 257 * An endpoint MUST NOT bundle INIT, INIT ACK or
258 * SHUTDOWN COMPLETE with any other chunks. 258 * SHUTDOWN COMPLETE with any other chunks.
259 * 259 *
260 * IG Section 2.11.2 260 * IG Section 2.11.2
261 * Furthermore, we require that the receiver of an INIT chunk MUST 261 * Furthermore, we require that the receiver of an INIT chunk MUST
262 * enforce these rules by silently discarding an arriving packet 262 * enforce these rules by silently discarding an arriving packet
@@ -282,7 +282,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep,
282 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); 282 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
283 283
284 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification 284 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification
285 * Tag. 285 * Tag.
286 */ 286 */
287 if (chunk->sctp_hdr->vtag != 0) 287 if (chunk->sctp_hdr->vtag != 0)
288 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); 288 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
@@ -326,7 +326,7 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep,
326 } 326 }
327 } 327 }
328 328
329 /* Grab the INIT header. */ 329 /* Grab the INIT header. */
330 chunk->subh.init_hdr = (sctp_inithdr_t *)chunk->skb->data; 330 chunk->subh.init_hdr = (sctp_inithdr_t *)chunk->skb->data;
331 331
332 /* Tag the variable length parameters. */ 332 /* Tag the variable length parameters. */
@@ -594,7 +594,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
594 /* "Decode" the chunk. We have no optional parameters so we 594 /* "Decode" the chunk. We have no optional parameters so we
595 * are in good shape. 595 * are in good shape.
596 */ 596 */
597 chunk->subh.cookie_hdr = 597 chunk->subh.cookie_hdr =
598 (struct sctp_signed_cookie *)chunk->skb->data; 598 (struct sctp_signed_cookie *)chunk->skb->data;
599 if (!pskb_pull(chunk->skb, ntohs(chunk->chunk_hdr->length) - 599 if (!pskb_pull(chunk->skb, ntohs(chunk->chunk_hdr->length) -
600 sizeof(sctp_chunkhdr_t))) 600 sizeof(sctp_chunkhdr_t)))
@@ -665,7 +665,7 @@ sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
665 if (!ev) 665 if (!ev)
666 goto nomem_ev; 666 goto nomem_ev;
667 667
668 /* Sockets API Draft Section 5.3.1.6 668 /* Sockets API Draft Section 5.3.1.6
669 * When a peer sends a Adaptation Layer Indication parameter , SCTP 669 * When a peer sends a Adaptation Layer Indication parameter , SCTP
670 * delivers this notification to inform the application that of the 670 * delivers this notification to inform the application that of the
671 * peers requested adaptation layer. 671 * peers requested adaptation layer.
@@ -891,7 +891,7 @@ sctp_disposition_t sctp_sf_sendbeat_8_3(const struct sctp_endpoint *ep,
891 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMER_UPDATE, 891 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMER_UPDATE,
892 SCTP_TRANSPORT(transport)); 892 SCTP_TRANSPORT(transport));
893 893
894 return SCTP_DISPOSITION_CONSUME; 894 return SCTP_DISPOSITION_CONSUME;
895} 895}
896 896
897/* 897/*
@@ -1280,7 +1280,7 @@ static sctp_disposition_t sctp_sf_do_unexpected_init(
1280 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 1280 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
1281 1281
1282 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification 1282 /* 3.1 A packet containing an INIT chunk MUST have a zero Verification
1283 * Tag. 1283 * Tag.
1284 */ 1284 */
1285 if (chunk->sctp_hdr->vtag != 0) 1285 if (chunk->sctp_hdr->vtag != 0)
1286 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands); 1286 return sctp_sf_tabort_8_4_8(ep, asoc, type, arg, commands);
@@ -1548,7 +1548,7 @@ sctp_disposition_t sctp_sf_do_5_2_3_initack(const struct sctp_endpoint *ep,
1548 /* Per the above section, we'll discard the chunk if we have an 1548 /* Per the above section, we'll discard the chunk if we have an
1549 * endpoint. If this is an OOTB INIT-ACK, treat it as such. 1549 * endpoint. If this is an OOTB INIT-ACK, treat it as such.
1550 */ 1550 */
1551 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) 1551 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
1552 return sctp_sf_ootb(ep, asoc, type, arg, commands); 1552 return sctp_sf_ootb(ep, asoc, type, arg, commands);
1553 else 1553 else
1554 return sctp_sf_discard_chunk(ep, asoc, type, arg, commands); 1554 return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
@@ -1760,9 +1760,9 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(const struct sctp_endpoint *ep,
1760 1760
1761 /* Clarification from Implementor's Guide: 1761 /* Clarification from Implementor's Guide:
1762 * D) When both local and remote tags match the endpoint should 1762 * D) When both local and remote tags match the endpoint should
1763 * enter the ESTABLISHED state, if it is in the COOKIE-ECHOED state. 1763 * enter the ESTABLISHED state, if it is in the COOKIE-ECHOED state.
1764 * It should stop any cookie timer that may be running and send 1764 * It should stop any cookie timer that may be running and send
1765 * a COOKIE ACK. 1765 * a COOKIE ACK.
1766 */ 1766 */
1767 1767
1768 /* Don't accidentally move back into established state. */ 1768 /* Don't accidentally move back into established state. */
@@ -1786,7 +1786,7 @@ static sctp_disposition_t sctp_sf_do_dupcook_d(const struct sctp_endpoint *ep,
1786 SCTP_COMM_UP, 0, 1786 SCTP_COMM_UP, 0,
1787 asoc->c.sinit_num_ostreams, 1787 asoc->c.sinit_num_ostreams,
1788 asoc->c.sinit_max_instreams, 1788 asoc->c.sinit_max_instreams,
1789 GFP_ATOMIC); 1789 GFP_ATOMIC);
1790 if (!ev) 1790 if (!ev)
1791 goto nomem; 1791 goto nomem;
1792 1792
@@ -1870,7 +1870,7 @@ sctp_disposition_t sctp_sf_do_5_2_4_dupcook(const struct sctp_endpoint *ep,
1870 /* "Decode" the chunk. We have no optional parameters so we 1870 /* "Decode" the chunk. We have no optional parameters so we
1871 * are in good shape. 1871 * are in good shape.
1872 */ 1872 */
1873 chunk->subh.cookie_hdr = (struct sctp_signed_cookie *)chunk->skb->data; 1873 chunk->subh.cookie_hdr = (struct sctp_signed_cookie *)chunk->skb->data;
1874 if (!pskb_pull(chunk->skb, ntohs(chunk->chunk_hdr->length) - 1874 if (!pskb_pull(chunk->skb, ntohs(chunk->chunk_hdr->length) -
1875 sizeof(sctp_chunkhdr_t))) 1875 sizeof(sctp_chunkhdr_t)))
1876 goto nomem; 1876 goto nomem;
@@ -1936,7 +1936,7 @@ sctp_disposition_t sctp_sf_do_5_2_4_dupcook(const struct sctp_endpoint *ep,
1936 default: /* Discard packet for all others. */ 1936 default: /* Discard packet for all others. */
1937 retval = sctp_sf_pdiscard(ep, asoc, type, arg, commands); 1937 retval = sctp_sf_pdiscard(ep, asoc, type, arg, commands);
1938 break; 1938 break;
1939 }; 1939 };
1940 1940
1941 /* Delete the tempory new association. */ 1941 /* Delete the tempory new association. */
1942 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(new_asoc)); 1942 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(new_asoc));
@@ -2083,7 +2083,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_err(const struct sctp_endpoint *ep,
2083 */ 2083 */
2084 sctp_walk_errors(err, chunk->chunk_hdr) { 2084 sctp_walk_errors(err, chunk->chunk_hdr) {
2085 if (SCTP_ERROR_STALE_COOKIE == err->cause) 2085 if (SCTP_ERROR_STALE_COOKIE == err->cause)
2086 return sctp_sf_do_5_2_6_stale(ep, asoc, type, 2086 return sctp_sf_do_5_2_6_stale(ep, asoc, type,
2087 arg, commands); 2087 arg, commands);
2088 } 2088 }
2089 2089
@@ -2185,10 +2185,10 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep,
2185 */ 2185 */
2186 sctp_add_cmd_sf(commands, SCTP_CMD_DEL_NON_PRIMARY, SCTP_NULL()); 2186 sctp_add_cmd_sf(commands, SCTP_CMD_DEL_NON_PRIMARY, SCTP_NULL());
2187 2187
2188 /* If we've sent any data bundled with COOKIE-ECHO we will need to 2188 /* If we've sent any data bundled with COOKIE-ECHO we will need to
2189 * resend 2189 * resend
2190 */ 2190 */
2191 sctp_add_cmd_sf(commands, SCTP_CMD_RETRAN, 2191 sctp_add_cmd_sf(commands, SCTP_CMD_RETRAN,
2192 SCTP_TRANSPORT(asoc->peer.primary_path)); 2192 SCTP_TRANSPORT(asoc->peer.primary_path));
2193 2193
2194 /* Cast away the const modifier, as we want to just 2194 /* Cast away the const modifier, as we want to just
@@ -2274,7 +2274,7 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
2274 error = ((sctp_errhdr_t *)chunk->skb->data)->cause; 2274 error = ((sctp_errhdr_t *)chunk->skb->data)->cause;
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_PERR(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);
@@ -2439,7 +2439,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(const struct sctp_endpoint *ep,
2439 ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC); 2439 ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC);
2440 if (!ev) { 2440 if (!ev) {
2441 disposition = SCTP_DISPOSITION_NOMEM; 2441 disposition = SCTP_DISPOSITION_NOMEM;
2442 goto out; 2442 goto out;
2443 } 2443 }
2444 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); 2444 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
2445 2445
@@ -2553,7 +2553,7 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(const struct sctp_endpoint *ep,
2553 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_ecne_chunk_t))) 2553 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_ecne_chunk_t)))
2554 return sctp_sf_violation_chunklen(ep, asoc, type, arg, 2554 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
2555 commands); 2555 commands);
2556 2556
2557 cwr = (sctp_cwrhdr_t *) chunk->skb->data; 2557 cwr = (sctp_cwrhdr_t *) chunk->skb->data;
2558 skb_pull(chunk->skb, sizeof(sctp_cwrhdr_t)); 2558 skb_pull(chunk->skb, sizeof(sctp_cwrhdr_t));
2559 2559
@@ -2661,7 +2661,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep,
2661 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, 2661 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG,
2662 SCTP_NULL()); 2662 SCTP_NULL());
2663 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 2663 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
2664 } 2664 }
2665 2665
2666 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t))) 2666 if (!sctp_chunk_length_valid(chunk, sizeof(sctp_data_chunk_t)))
2667 return sctp_sf_violation_chunklen(ep, asoc, type, arg, 2667 return sctp_sf_violation_chunklen(ep, asoc, type, arg,
@@ -2743,7 +2743,7 @@ discard_noforce:
2743 return SCTP_DISPOSITION_DISCARD; 2743 return SCTP_DISPOSITION_DISCARD;
2744consume: 2744consume:
2745 return SCTP_DISPOSITION_CONSUME; 2745 return SCTP_DISPOSITION_CONSUME;
2746 2746
2747} 2747}
2748 2748
2749/* 2749/*
@@ -2930,7 +2930,7 @@ sctp_disposition_t sctp_sf_tabort_8_4_8(const struct sctp_endpoint *ep,
2930 /* Make an ABORT. The T bit will be set if the asoc 2930 /* Make an ABORT. The T bit will be set if the asoc
2931 * is NULL. 2931 * is NULL.
2932 */ 2932 */
2933 abort = sctp_make_abort(asoc, chunk, 0); 2933 abort = sctp_make_abort(asoc, chunk, 0);
2934 if (!abort) { 2934 if (!abort) {
2935 sctp_ootb_pkt_free(packet); 2935 sctp_ootb_pkt_free(packet);
2936 return SCTP_DISPOSITION_NOMEM; 2936 return SCTP_DISPOSITION_NOMEM;
@@ -2994,7 +2994,7 @@ sctp_disposition_t sctp_sf_operr_notify(const struct sctp_endpoint *ep,
2994 } 2994 }
2995 2995
2996 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR, 2996 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_OPERR,
2997 SCTP_CHUNK(chunk)); 2997 SCTP_CHUNK(chunk));
2998 } 2998 }
2999 return SCTP_DISPOSITION_CONSUME; 2999 return SCTP_DISPOSITION_CONSUME;
3000 3000
@@ -3128,7 +3128,7 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
3128 */ 3128 */
3129 if (SCTP_CID_ABORT == ch->type) 3129 if (SCTP_CID_ABORT == ch->type)
3130 return sctp_sf_pdiscard(ep, asoc, type, arg, commands); 3130 return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
3131 3131
3132 ch = (sctp_chunkhdr_t *) ch_end; 3132 ch = (sctp_chunkhdr_t *) ch_end;
3133 } while (ch_end < skb->tail); 3133 } while (ch_end < skb->tail);
3134 3134
@@ -3175,8 +3175,8 @@ static sctp_disposition_t sctp_sf_shut_8_4_5(const struct sctp_endpoint *ep,
3175 3175
3176 if (packet) { 3176 if (packet) {
3177 /* Make an SHUTDOWN_COMPLETE. 3177 /* Make an SHUTDOWN_COMPLETE.
3178 * The T bit will be set if the asoc is NULL. 3178 * The T bit will be set if the asoc is NULL.
3179 */ 3179 */
3180 shut = sctp_make_shutdown_complete(asoc, chunk); 3180 shut = sctp_make_shutdown_complete(asoc, chunk);
3181 if (!shut) { 3181 if (!shut) {
3182 sctp_ootb_pkt_free(packet); 3182 sctp_ootb_pkt_free(packet);
@@ -3261,10 +3261,10 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3261 3261
3262 /* ADDIP 4.2 C1) Compare the value of the serial number to the value 3262 /* ADDIP 4.2 C1) Compare the value of the serial number to the value
3263 * the endpoint stored in a new association variable 3263 * the endpoint stored in a new association variable
3264 * 'Peer-Serial-Number'. 3264 * 'Peer-Serial-Number'.
3265 */ 3265 */
3266 if (serial == asoc->peer.addip_serial + 1) { 3266 if (serial == asoc->peer.addip_serial + 1) {
3267 /* ADDIP 4.2 C2) If the value found in the serial number is 3267 /* ADDIP 4.2 C2) If the value found in the serial number is
3268 * equal to the ('Peer-Serial-Number' + 1), the endpoint MUST 3268 * equal to the ('Peer-Serial-Number' + 1), the endpoint MUST
3269 * do V1-V5. 3269 * do V1-V5.
3270 */ 3270 */
@@ -3285,9 +3285,9 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3285 else 3285 else
3286 return SCTP_DISPOSITION_DISCARD; 3286 return SCTP_DISPOSITION_DISCARD;
3287 } else { 3287 } else {
3288 /* ADDIP 4.2 C4) Otherwise, the ASCONF Chunk is discarded since 3288 /* ADDIP 4.2 C4) Otherwise, the ASCONF Chunk is discarded since
3289 * it must be either a stale packet or from an attacker. 3289 * it must be either a stale packet or from an attacker.
3290 */ 3290 */
3291 return SCTP_DISPOSITION_DISCARD; 3291 return SCTP_DISPOSITION_DISCARD;
3292 } 3292 }
3293 3293
@@ -3296,7 +3296,7 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3296 * being responded to. 3296 * being responded to.
3297 */ 3297 */
3298 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack)); 3298 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(asconf_ack));
3299 3299
3300 return SCTP_DISPOSITION_CONSUME; 3300 return SCTP_DISPOSITION_CONSUME;
3301} 3301}
3302 3302
@@ -3307,7 +3307,7 @@ sctp_disposition_t sctp_sf_do_asconf(const struct sctp_endpoint *ep,
3307 */ 3307 */
3308sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep, 3308sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3309 const struct sctp_association *asoc, 3309 const struct sctp_association *asoc,
3310 const sctp_subtype_t type, void *arg, 3310 const sctp_subtype_t type, void *arg,
3311 sctp_cmd_seq_t *commands) 3311 sctp_cmd_seq_t *commands)
3312{ 3312{
3313 struct sctp_chunk *asconf_ack = arg; 3313 struct sctp_chunk *asconf_ack = arg;
@@ -3359,7 +3359,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3359 SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO)); 3359 SCTP_TO(SCTP_EVENT_TIMEOUT_T4_RTO));
3360 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET,SCTP_NULL()); 3360 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET,SCTP_NULL());
3361 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3361 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3362 SCTP_ERROR(ECONNABORTED)); 3362 SCTP_ERROR(ECONNABORTED));
3363 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3363 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3364 SCTP_PERR(SCTP_ERROR_ASCONF_ACK)); 3364 SCTP_PERR(SCTP_ERROR_ASCONF_ACK));
3365 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3365 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
@@ -3387,7 +3387,7 @@ sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep,
3387 */ 3387 */
3388 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET,SCTP_NULL()); 3388 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET,SCTP_NULL());
3389 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3389 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3390 SCTP_ERROR(ECONNABORTED)); 3390 SCTP_ERROR(ECONNABORTED));
3391 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3391 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3392 SCTP_PERR(SCTP_ERROR_ASCONF_ACK)); 3392 SCTP_PERR(SCTP_ERROR_ASCONF_ACK));
3393 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3393 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
@@ -3451,17 +3451,17 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,
3451 3451
3452 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); 3452 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
3453 if (len > sizeof(struct sctp_fwdtsn_hdr)) 3453 if (len > sizeof(struct sctp_fwdtsn_hdr))
3454 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, 3454 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
3455 SCTP_CHUNK(chunk)); 3455 SCTP_CHUNK(chunk));
3456 3456
3457 /* Count this as receiving DATA. */ 3457 /* Count this as receiving DATA. */
3458 if (asoc->autoclose) { 3458 if (asoc->autoclose) {
3459 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART, 3459 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
3460 SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE)); 3460 SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE));
3461 } 3461 }
3462 3462
3463 /* FIXME: For now send a SACK, but DATA processing may 3463 /* FIXME: For now send a SACK, but DATA processing may
3464 * send another. 3464 * send another.
3465 */ 3465 */
3466 sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE()); 3466 sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE());
3467 3467
@@ -3511,9 +3511,9 @@ sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
3511 3511
3512 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn)); 3512 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));
3513 if (len > sizeof(struct sctp_fwdtsn_hdr)) 3513 if (len > sizeof(struct sctp_fwdtsn_hdr))
3514 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN, 3514 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,
3515 SCTP_CHUNK(chunk)); 3515 SCTP_CHUNK(chunk));
3516 3516
3517 /* Go a head and force a SACK, since we are shutting down. */ 3517 /* Go a head and force a SACK, since we are shutting down. */
3518gen_shutdown: 3518gen_shutdown:
3519 /* Implementor's Guide. 3519 /* Implementor's Guide.
@@ -3527,7 +3527,7 @@ gen_shutdown:
3527 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART, 3527 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
3528 SCTP_TO(SCTP_EVENT_TIMEOUT_T2_SHUTDOWN)); 3528 SCTP_TO(SCTP_EVENT_TIMEOUT_T2_SHUTDOWN));
3529 3529
3530 return SCTP_DISPOSITION_CONSUME; 3530 return SCTP_DISPOSITION_CONSUME;
3531} 3531}
3532 3532
3533/* 3533/*
@@ -3706,7 +3706,7 @@ sctp_disposition_t sctp_sf_violation(const struct sctp_endpoint *ep,
3706 * if it's length is set to be smaller then the size of sctp_sack_chunk_t. 3706 * if it's length is set to be smaller then the size of sctp_sack_chunk_t.
3707 * 3707 *
3708 * We inform the other end by sending an ABORT with a Protocol Violation 3708 * We inform the other end by sending an ABORT with a Protocol Violation
3709 * error code. 3709 * error code.
3710 * 3710 *
3711 * Section: Not specified 3711 * Section: Not specified
3712 * Verification Tag: Nothing to do 3712 * Verification Tag: Nothing to do
@@ -3747,7 +3747,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
3747 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION)); 3747 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3748 } else { 3748 } else {
3749 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR, 3749 sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,
3750 SCTP_ERROR(ECONNABORTED)); 3750 SCTP_ERROR(ECONNABORTED));
3751 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED, 3751 sctp_add_cmd_sf(commands, SCTP_CMD_ASSOC_FAILED,
3752 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION)); 3752 SCTP_PERR(SCTP_ERROR_PROTO_VIOLATION));
3753 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB); 3753 SCTP_DEC_STATS(SCTP_MIB_CURRESTAB);
@@ -3756,7 +3756,7 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
3756 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL()); 3756 sctp_add_cmd_sf(commands, SCTP_CMD_DISCARD_PACKET, SCTP_NULL());
3757 3757
3758 SCTP_INC_STATS(SCTP_MIB_ABORTEDS); 3758 SCTP_INC_STATS(SCTP_MIB_ABORTEDS);
3759 3759
3760 return SCTP_DISPOSITION_ABORT; 3760 return SCTP_DISPOSITION_ABORT;
3761 3761
3762nomem: 3762nomem:
@@ -4437,7 +4437,7 @@ sctp_disposition_t sctp_sf_do_9_2_start_shutdown(
4437 /* sctp-implguide 2.10 Issues with Heartbeating and failover 4437 /* sctp-implguide 2.10 Issues with Heartbeating and failover
4438 * 4438 *
4439 * HEARTBEAT ... is discontinued after sending either SHUTDOWN 4439 * HEARTBEAT ... is discontinued after sending either SHUTDOWN
4440 * or SHUTDOWN-ACK. 4440 * or SHUTDOWN-ACK.
4441 */ 4441 */
4442 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMERS_STOP, SCTP_NULL()); 4442 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMERS_STOP, SCTP_NULL());
4443 4443
@@ -4515,7 +4515,7 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown_ack(
4515 /* sctp-implguide 2.10 Issues with Heartbeating and failover 4515 /* sctp-implguide 2.10 Issues with Heartbeating and failover
4516 * 4516 *
4517 * HEARTBEAT ... is discontinued after sending either SHUTDOWN 4517 * HEARTBEAT ... is discontinued after sending either SHUTDOWN
4518 * or SHUTDOWN-ACK. 4518 * or SHUTDOWN-ACK.
4519 */ 4519 */
4520 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMERS_STOP, SCTP_NULL()); 4520 sctp_add_cmd_sf(commands, SCTP_CMD_HB_TIMERS_STOP, SCTP_NULL());
4521 4521
@@ -4874,7 +4874,7 @@ sctp_disposition_t sctp_sf_t4_timer_expire(
4874 /* ADDIP 4.1 B4) Re-transmit the ASCONF Chunk last sent and if possible 4874 /* ADDIP 4.1 B4) Re-transmit the ASCONF Chunk last sent and if possible
4875 * choose an alternate destination address (please refer to RFC2960 4875 * choose an alternate destination address (please refer to RFC2960
4876 * [5] section 6.4.1). An endpoint MUST NOT add new parameters to this 4876 * [5] section 6.4.1). An endpoint MUST NOT add new parameters to this
4877 * chunk, it MUST be the same (including its serial number) as the last 4877 * chunk, it MUST be the same (including its serial number) as the last
4878 * ASCONF sent. 4878 * ASCONF sent.
4879 */ 4879 */
4880 sctp_chunk_hold(asoc->addip_last_asconf); 4880 sctp_chunk_hold(asoc->addip_last_asconf);
@@ -4953,7 +4953,7 @@ sctp_disposition_t sctp_sf_autoclose_timer_expire(
4953 /* sctpimpguide-05 Section 2.12.2 4953 /* sctpimpguide-05 Section 2.12.2
4954 * The sender of the SHUTDOWN MAY also start an overall guard timer 4954 * The sender of the SHUTDOWN MAY also start an overall guard timer
4955 * 'T5-shutdown-guard' to bound the overall time for shutdown sequence. 4955 * 'T5-shutdown-guard' to bound the overall time for shutdown sequence.
4956 */ 4956 */
4957 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_START, 4957 sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_START,
4958 SCTP_TO(SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD)); 4958 SCTP_TO(SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD));
4959 disposition = SCTP_DISPOSITION_CONSUME; 4959 disposition = SCTP_DISPOSITION_CONSUME;
@@ -5127,7 +5127,7 @@ static struct sctp_packet *sctp_ootb_pkt_new(const struct sctp_association *asoc
5127 vtag = ntohl(init->init_hdr.init_tag); 5127 vtag = ntohl(init->init_hdr.init_tag);
5128 break; 5128 break;
5129 } 5129 }
5130 default: 5130 default:
5131 vtag = ntohl(chunk->sctp_hdr->vtag); 5131 vtag = ntohl(chunk->sctp_hdr->vtag);
5132 break; 5132 break;
5133 } 5133 }
@@ -5176,7 +5176,7 @@ static void sctp_send_stale_cookie_err(const struct sctp_endpoint *ep,
5176 /* Override the OOTB vtag from the cookie. */ 5176 /* Override the OOTB vtag from the cookie. */
5177 cookie = chunk->subh.cookie_hdr; 5177 cookie = chunk->subh.cookie_hdr;
5178 packet->vtag = cookie->c.peer_vtag; 5178 packet->vtag = cookie->c.peer_vtag;
5179 5179
5180 /* Set the skb to the belonging sock for accounting. */ 5180 /* Set the skb to the belonging sock for accounting. */
5181 err_chunk->skb->sk = ep->base.sk; 5181 err_chunk->skb->sk = ep->base.sk;
5182 sctp_packet_append_chunk(packet, err_chunk); 5182 sctp_packet_append_chunk(packet, err_chunk);
@@ -5310,7 +5310,7 @@ static int sctp_eat_data(const struct sctp_association *asoc,
5310 sctp_add_cmd_sf(commands, SCTP_CMD_PART_DELIVER, SCTP_NULL()); 5310 sctp_add_cmd_sf(commands, SCTP_CMD_PART_DELIVER, SCTP_NULL());
5311 } 5311 }
5312 5312
5313 /* Spill over rwnd a little bit. Note: While allowed, this spill over 5313 /* Spill over rwnd a little bit. Note: While allowed, this spill over
5314 * seems a bit troublesome in that frag_point varies based on 5314 * seems a bit troublesome in that frag_point varies based on
5315 * PMTU. In cases, such as loopback, this might be a rather 5315 * PMTU. In cases, such as loopback, this might be a rather
5316 * large spill over. 5316 * large spill over.