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, 22 insertions, 0 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 2c165dc9fb71..fce1f602cde2 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1534,6 +1534,28 @@ sctp_disposition_t sctp_sf_do_5_2_2_dupinit(const struct sctp_endpoint *ep,
1534} 1534}
1535 1535
1536 1536
1537/*
1538 * Unexpected INIT-ACK handler.
1539 *
1540 * Section 5.2.3
1541 * If an INIT ACK received by an endpoint in any state other than the
1542 * COOKIE-WAIT state, the endpoint should discard the INIT ACK chunk.
1543 * An unexpected INIT ACK usually indicates the processing of an old or
1544 * duplicated INIT chunk.
1545*/
1546sctp_disposition_t sctp_sf_do_5_2_3_initack(const struct sctp_endpoint *ep,
1547 const struct sctp_association *asoc,
1548 const sctp_subtype_t type,
1549 void *arg, sctp_cmd_seq_t *commands)
1550{
1551 /* Per the above section, we'll discard the chunk if we have an
1552 * endpoint. If this is an OOTB INIT-ACK, treat it as such.
1553 */
1554 if (ep == sctp_sk((sctp_get_ctl_sock()))->ep)
1555 return sctp_sf_ootb(ep, asoc, type, arg, commands);
1556 else
1557 return sctp_sf_discard_chunk(ep, asoc, type, arg, commands);
1558}
1537 1559
1538/* Unexpected COOKIE-ECHO handler for peer restart (Table 2, action 'A') 1560/* Unexpected COOKIE-ECHO handler for peer restart (Table 2, action 'A')
1539 * 1561 *