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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 86073df418f5..505c7de10c50 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -2414,6 +2414,17 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(const struct sctp_endpoint *ep,
2414 skb_pull(chunk->skb, sizeof(sctp_shutdownhdr_t)); 2414 skb_pull(chunk->skb, sizeof(sctp_shutdownhdr_t));
2415 chunk->subh.shutdown_hdr = sdh; 2415 chunk->subh.shutdown_hdr = sdh;
2416 2416
2417 /* API 5.3.1.5 SCTP_SHUTDOWN_EVENT
2418 * When a peer sends a SHUTDOWN, SCTP delivers this notification to
2419 * inform the application that it should cease sending data.
2420 */
2421 ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC);
2422 if (!ev) {
2423 disposition = SCTP_DISPOSITION_NOMEM;
2424 goto out;
2425 }
2426 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
2427
2417 /* Upon the reception of the SHUTDOWN, the peer endpoint shall 2428 /* Upon the reception of the SHUTDOWN, the peer endpoint shall
2418 * - enter the SHUTDOWN-RECEIVED state, 2429 * - enter the SHUTDOWN-RECEIVED state,
2419 * - stop accepting new data from its SCTP user 2430 * - stop accepting new data from its SCTP user
@@ -2439,17 +2450,6 @@ sctp_disposition_t sctp_sf_do_9_2_shutdown(const struct sctp_endpoint *ep,
2439 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_CTSN, 2450 sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_CTSN,
2440 SCTP_U32(chunk->subh.shutdown_hdr->cum_tsn_ack)); 2451 SCTP_U32(chunk->subh.shutdown_hdr->cum_tsn_ack));
2441 2452
2442 /* API 5.3.1.5 SCTP_SHUTDOWN_EVENT
2443 * When a peer sends a SHUTDOWN, SCTP delivers this notification to
2444 * inform the application that it should cease sending data.
2445 */
2446 ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC);
2447 if (!ev) {
2448 disposition = SCTP_DISPOSITION_NOMEM;
2449 goto out;
2450 }
2451 sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev));
2452
2453out: 2453out:
2454 return disposition; 2454 return disposition;
2455} 2455}