aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statetable.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/sm_statetable.c')
-rw-r--r--net/sctp/sm_statetable.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c
index ddb0ba3974b0..a93a4bc8f68f 100644
--- a/net/sctp/sm_statetable.c
+++ b/net/sctp/sm_statetable.c
@@ -523,6 +523,34 @@ static const sctp_sm_table_entry_t prsctp_chunk_event_table[SCTP_NUM_PRSCTP_CHUN
523 TYPE_SCTP_FWD_TSN, 523 TYPE_SCTP_FWD_TSN,
524}; /*state_fn_t prsctp_chunk_event_table[][] */ 524}; /*state_fn_t prsctp_chunk_event_table[][] */
525 525
526#define TYPE_SCTP_AUTH { \
527 /* SCTP_STATE_EMPTY */ \
528 TYPE_SCTP_FUNC(sctp_sf_ootb), \
529 /* SCTP_STATE_CLOSED */ \
530 TYPE_SCTP_FUNC(sctp_sf_ootb), \
531 /* SCTP_STATE_COOKIE_WAIT */ \
532 TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \
533 /* SCTP_STATE_COOKIE_ECHOED */ \
534 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
535 /* SCTP_STATE_ESTABLISHED */ \
536 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
537 /* SCTP_STATE_SHUTDOWN_PENDING */ \
538 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
539 /* SCTP_STATE_SHUTDOWN_SENT */ \
540 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
541 /* SCTP_STATE_SHUTDOWN_RECEIVED */ \
542 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
543 /* SCTP_STATE_SHUTDOWN_ACK_SENT */ \
544 TYPE_SCTP_FUNC(sctp_sf_eat_auth), \
545} /* TYPE_SCTP_AUTH */
546
547/* The primary index for this table is the chunk type.
548 * The secondary index for this table is the state.
549 */
550static const sctp_sm_table_entry_t auth_chunk_event_table[SCTP_NUM_AUTH_CHUNK_TYPES][SCTP_STATE_NUM_STATES] = {
551 TYPE_SCTP_AUTH,
552}; /*state_fn_t auth_chunk_event_table[][] */
553
526static const sctp_sm_table_entry_t 554static const sctp_sm_table_entry_t
527chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = { 555chunk_event_table_unknown[SCTP_STATE_NUM_STATES] = {
528 /* SCTP_STATE_EMPTY */ 556 /* SCTP_STATE_EMPTY */
@@ -976,5 +1004,10 @@ static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid,
976 return &addip_chunk_event_table[1][state]; 1004 return &addip_chunk_event_table[1][state];
977 } 1005 }
978 1006
1007 if (sctp_auth_enable) {
1008 if (cid == SCTP_CID_AUTH)
1009 return &auth_chunk_event_table[0][state];
1010 }
1011
979 return &chunk_event_table_unknown[state]; 1012 return &chunk_event_table_unknown[state];
980} 1013}