• Home
  • Raw
  • Download

Lines Matching full:asoc

53 					const struct sctp_association *asoc,
56 static int sctp_eat_data(const struct sctp_association *asoc,
61 const struct sctp_association *asoc,
65 const struct sctp_association *asoc,
72 const struct sctp_association *asoc,
79 const struct sctp_association *asoc,
86 const struct sctp_association *asoc,
96 const struct sctp_association *asoc,
102 const struct sctp_association *asoc,
111 const struct sctp_association *asoc,
119 const struct sctp_association *asoc,
127 const struct sctp_association *asoc,
135 const struct sctp_association *asoc,
141 const struct sctp_association *asoc,
147 const struct sctp_association *asoc,
154 const struct sctp_association *asoc,
217 * (endpoint, asoc, chunk)
220 * (asoc, reply_msg, msg_up, timers, counters)
226 const struct sctp_association *asoc, in sctp_sf_do_4_C() argument
233 if (!sctp_vtag_verify_either(chunk, asoc)) in sctp_sf_do_4_C()
234 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_4_C()
242 return sctp_sf_violation_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_do_4_C()
246 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_4_C()
256 ev = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_SHUTDOWN_COMP, in sctp_sf_do_4_C()
302 * (endpoint, asoc, chunk)
305 * (asoc, reply_msg, msg_up, timers, counters)
311 const struct sctp_association *asoc, in sctp_sf_do_5_1B_init() argument
325 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
337 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
345 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
352 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
359 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
368 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1B_init()
372 if (!sctp_verify_init(net, ep, asoc, chunk->chunk_hdr->type, in sctp_sf_do_5_1B_init()
379 packet = sctp_abort_pkt_new(net, ep, asoc, arg, in sctp_sf_do_5_1B_init()
396 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, in sctp_sf_do_5_1B_init()
501 * (endpoint, asoc, chunk)
504 * (asoc, reply_msg, msg_up, timers, counters)
510 const struct sctp_association *asoc, in sctp_sf_do_5_1C_ack() argument
520 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_5_1C_ack()
521 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1C_ack()
528 return sctp_sf_violation_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1C_ack()
532 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_5_1C_ack()
539 if (!sctp_verify_init(net, ep, asoc, chunk->chunk_hdr->type, in sctp_sf_do_5_1C_ack()
551 packet = sctp_abort_pkt_new(net, ep, asoc, arg, in sctp_sf_do_5_1C_ack()
578 if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) in sctp_sf_do_5_1C_ack()
579 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1C_ack()
583 asoc, chunk->transport); in sctp_sf_do_5_1C_ack()
628 const struct sctp_association *asoc) in sctp_auth_chunk_verify() argument
643 if (!net->sctp.auth_enable || !asoc->peer.auth_capable) in sctp_auth_chunk_verify()
648 auth.asoc = chunk->asoc; in sctp_auth_chunk_verify()
656 return sctp_sf_authenticate(asoc, &auth) == SCTP_IERROR_NO_ERROR; in sctp_auth_chunk_verify()
683 * (endpoint, asoc, chunk)
686 * (asoc, reply_msg, msg_up, timers, counters)
692 const struct sctp_association *asoc, in sctp_sf_do_5_1D_ce() argument
706 if (asoc && !sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_5_1D_ce()
707 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
714 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
723 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_5_1D_ce()
733 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
748 new_asoc = sctp_unpack_cookie(ep, asoc, chunk, GFP_ATOMIC, &error, in sctp_sf_do_5_1D_ce()
766 sctp_send_stale_cookie_err(net, ep, asoc, chunk, commands, in sctp_sf_do_5_1D_ce()
768 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
772 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
802 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1D_ce()
901 * (endpoint, asoc, chunk)
904 * (asoc, reply_msg, msg_up, timers, counters)
910 const struct sctp_association *asoc, in sctp_sf_do_5_1E_ca() argument
918 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_5_1E_ca()
919 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_1E_ca()
925 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_5_1E_ca()
952 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE]) in sctp_sf_do_5_1E_ca()
960 ev = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_UP, in sctp_sf_do_5_1E_ca()
961 0, asoc->c.sinit_num_ostreams, in sctp_sf_do_5_1E_ca()
962 asoc->c.sinit_max_instreams, in sctp_sf_do_5_1E_ca()
975 if (asoc->peer.adaptation_ind) { in sctp_sf_do_5_1E_ca()
976 ev = sctp_ulpevent_make_adaptation_indication(asoc, GFP_ATOMIC); in sctp_sf_do_5_1E_ca()
984 if (!asoc->peer.auth_capable) { in sctp_sf_do_5_1E_ca()
985 ev = sctp_ulpevent_make_authkey(asoc, 0, SCTP_AUTH_NO_AUTH, in sctp_sf_do_5_1E_ca()
1001 const struct sctp_association *asoc, in sctp_sf_heartbeat() argument
1010 reply = sctp_make_heartbeat(asoc, transport); in sctp_sf_heartbeat()
1027 const struct sctp_association *asoc, in sctp_sf_sendbeat_8_3() argument
1034 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_sf_sendbeat_8_3()
1054 sctp_sf_heartbeat(ep, asoc, type, arg, in sctp_sf_sendbeat_8_3()
1072 /* resend asoc strreset_chunk. */
1075 const struct sctp_association *asoc, in sctp_sf_send_reconf() argument
1082 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_sf_send_reconf()
1093 sctp_chunk_hold(asoc->strreset_chunk); in sctp_sf_send_reconf()
1095 SCTP_CHUNK(asoc->strreset_chunk)); in sctp_sf_send_reconf()
1118 * (endpoint, asoc, chunk)
1121 * (asoc, reply_msg, msg_up, timers, counters)
1127 const struct sctp_association *asoc, in sctp_sf_beat_8_3() argument
1136 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_beat_8_3()
1137 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_beat_8_3()
1142 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_beat_8_3()
1154 return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, in sctp_sf_beat_8_3()
1160 reply = sctp_make_heartbeat_ack(asoc, chunk, param_hdr, paylen); in sctp_sf_beat_8_3()
1192 * (endpoint, asoc, chunk)
1195 * (asoc, reply_msg, msg_up, timers, counters)
1201 const struct sctp_association *asoc, in sctp_sf_backbeat_8_3() argument
1212 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_backbeat_8_3()
1213 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_backbeat_8_3()
1218 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_backbeat_8_3()
1227 link = sctp_assoc_lookup_paddr(asoc, &from_addr); in sctp_sf_backbeat_8_3()
1234 asoc, in sctp_sf_backbeat_8_3()
1239 asoc, in sctp_sf_backbeat_8_3()
1339 const struct sctp_association *asoc, in sctp_sf_check_restart_addrs() argument
1360 if (!list_has_sctp_addr(&asoc->peer.transport_addr_list, in sctp_sf_check_restart_addrs()
1379 const struct sctp_association *asoc) in sctp_tietags_populate() argument
1381 switch (asoc->state) { in sctp_tietags_populate()
1386 new_asoc->c.my_vtag = asoc->c.my_vtag; in sctp_tietags_populate()
1387 new_asoc->c.my_ttag = asoc->c.my_vtag; in sctp_tietags_populate()
1392 new_asoc->c.my_vtag = asoc->c.my_vtag; in sctp_tietags_populate()
1393 new_asoc->c.my_ttag = asoc->c.my_vtag; in sctp_tietags_populate()
1394 new_asoc->c.peer_ttag = asoc->c.peer_vtag; in sctp_tietags_populate()
1401 new_asoc->c.my_ttag = asoc->c.my_vtag; in sctp_tietags_populate()
1402 new_asoc->c.peer_ttag = asoc->c.peer_vtag; in sctp_tietags_populate()
1410 new_asoc->rwnd = asoc->rwnd; in sctp_tietags_populate()
1411 new_asoc->c.sinit_num_ostreams = asoc->c.sinit_num_ostreams; in sctp_tietags_populate()
1412 new_asoc->c.sinit_max_instreams = asoc->c.sinit_max_instreams; in sctp_tietags_populate()
1413 new_asoc->c.initial_tsn = asoc->c.initial_tsn; in sctp_tietags_populate()
1426 const struct sctp_association *asoc) in sctp_tietags_compare() argument
1429 if ((asoc->c.my_vtag != new_asoc->c.my_vtag) && in sctp_tietags_compare()
1430 (asoc->c.peer_vtag != new_asoc->c.peer_vtag) && in sctp_tietags_compare()
1431 (asoc->c.my_vtag == new_asoc->c.my_ttag) && in sctp_tietags_compare()
1432 (asoc->c.peer_vtag == new_asoc->c.peer_ttag)) in sctp_tietags_compare()
1436 if ((asoc->c.my_vtag == new_asoc->c.my_vtag) && in sctp_tietags_compare()
1437 ((asoc->c.peer_vtag != new_asoc->c.peer_vtag) || in sctp_tietags_compare()
1438 (0 == asoc->c.peer_vtag))) { in sctp_tietags_compare()
1443 if ((asoc->c.my_vtag == new_asoc->c.my_vtag) && in sctp_tietags_compare()
1444 (asoc->c.peer_vtag == new_asoc->c.peer_vtag)) in sctp_tietags_compare()
1448 if ((asoc->c.my_vtag != new_asoc->c.my_vtag) && in sctp_tietags_compare()
1449 (asoc->c.peer_vtag == new_asoc->c.peer_vtag) && in sctp_tietags_compare()
1464 const struct sctp_association *asoc, in sctp_sf_do_unexpected_init() argument
1479 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_unexpected_init()
1491 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_unexpected_init()
1495 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_unexpected_init()
1501 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_unexpected_init()
1511 if (!sctp_verify_init(net, ep, asoc, chunk->chunk_hdr->type, in sctp_sf_do_unexpected_init()
1518 packet = sctp_abort_pkt_new(net, ep, asoc, arg, in sctp_sf_do_unexpected_init()
1534 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, in sctp_sf_do_unexpected_init()
1568 if (!sctp_state(asoc, COOKIE_WAIT)) { in sctp_sf_do_unexpected_init()
1569 if (!sctp_sf_check_restart_addrs(new_asoc, asoc, chunk, in sctp_sf_do_unexpected_init()
1576 sctp_tietags_populate(new_asoc, asoc); in sctp_sf_do_unexpected_init()
1669 * (endpoint, asoc, chunk)
1672 * (asoc, reply_msg, msg_up, timers, counters)
1679 const struct sctp_association *asoc, in sctp_sf_do_5_2_1_siminit() argument
1687 return sctp_sf_do_unexpected_init(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_1_siminit()
1724 * (endpoint, asoc, chunk)
1727 * (asoc, reply_msg, msg_up, timers, counters)
1734 const struct sctp_association *asoc, in sctp_sf_do_5_2_2_dupinit() argument
1742 return sctp_sf_do_unexpected_init(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_2_dupinit()
1758 const struct sctp_association *asoc, in sctp_sf_do_5_2_3_initack() argument
1767 return sctp_sf_ootb(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_3_initack()
1769 return sctp_sf_discard_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_3_initack()
1780 const struct sctp_association *asoc, in sctp_sf_do_dupcook_a() argument
1810 if (!sctp_sf_check_restart_addrs(new_asoc, asoc, chunk, commands)) in sctp_sf_do_dupcook_a()
1819 if (sctp_state(asoc, SHUTDOWN_ACK_SENT)) { in sctp_sf_do_dupcook_a()
1820 disposition = __sctp_sf_do_9_2_reshutack(net, ep, asoc, in sctp_sf_do_dupcook_a()
1826 err = sctp_make_op_error(asoc, chunk, in sctp_sf_do_dupcook_a()
1852 if (sctp_assoc_update((struct sctp_association *)asoc, new_asoc)) { in sctp_sf_do_dupcook_a()
1855 abort = sctp_make_abort(asoc, NULL, sizeof(struct sctp_errhdr)); in sctp_sf_do_dupcook_a()
1868 repl = sctp_make_cookie_ack(asoc, chunk); in sctp_sf_do_dupcook_a()
1873 ev = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_RESTART, 0, in sctp_sf_do_dupcook_a()
1874 asoc->c.sinit_num_ostreams, in sctp_sf_do_dupcook_a()
1875 asoc->c.sinit_max_instreams, in sctp_sf_do_dupcook_a()
1881 if ((sctp_state(asoc, SHUTDOWN_PENDING) || in sctp_sf_do_dupcook_a()
1882 sctp_state(asoc, SHUTDOWN_SENT)) && in sctp_sf_do_dupcook_a()
1883 (sctp_sstate(asoc->base.sk, CLOSING) || in sctp_sf_do_dupcook_a()
1884 sock_flag(asoc->base.sk, SOCK_DEAD))) { in sctp_sf_do_dupcook_a()
1890 return sctp_sf_do_9_2_start_shutdown(net, ep, asoc, in sctp_sf_do_dupcook_a()
1917 const struct sctp_association *asoc, in sctp_sf_do_dupcook_b() argument
1943 if (asoc->state < SCTP_STATE_ESTABLISHED) in sctp_sf_do_dupcook_b()
1975 if (asoc->peer.adaptation_ind) in sctp_sf_do_dupcook_b()
1978 if (!asoc->peer.auth_capable) in sctp_sf_do_dupcook_b()
1999 const struct sctp_association *asoc, in sctp_sf_do_dupcook_c() argument
2022 const struct sctp_association *asoc, in sctp_sf_do_dupcook_d() argument
2037 if (!sctp_auth_chunk_verify(net, chunk, asoc)) in sctp_sf_do_dupcook_d()
2041 if (asoc->state < SCTP_STATE_ESTABLISHED) { in sctp_sf_do_dupcook_d()
2057 ev = sctp_ulpevent_make_assoc_change(asoc, 0, in sctp_sf_do_dupcook_d()
2059 asoc->c.sinit_num_ostreams, in sctp_sf_do_dupcook_d()
2060 asoc->c.sinit_max_instreams, in sctp_sf_do_dupcook_d()
2070 if (asoc->peer.adaptation_ind) { in sctp_sf_do_dupcook_d()
2071 ai_ev = sctp_ulpevent_make_adaptation_indication(asoc, in sctp_sf_do_dupcook_d()
2078 if (!asoc->peer.auth_capable) { in sctp_sf_do_dupcook_d()
2079 auth_ev = sctp_ulpevent_make_authkey(asoc, 0, in sctp_sf_do_dupcook_d()
2087 repl = sctp_make_cookie_ack(asoc, chunk); in sctp_sf_do_dupcook_d()
2124 * (endpoint, asoc, chunk)
2127 * (asoc, reply_msg, msg_up, timers, counters)
2134 const struct sctp_association *asoc, in sctp_sf_do_5_2_4_dupcook() argument
2152 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_5_2_4_dupcook()
2153 asoc = NULL; in sctp_sf_do_5_2_4_dupcook()
2154 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_4_dupcook()
2170 new_asoc = sctp_unpack_cookie(ep, asoc, chunk, GFP_ATOMIC, &error, in sctp_sf_do_5_2_4_dupcook()
2188 sctp_send_stale_cookie_err(net, ep, asoc, chunk, commands, in sctp_sf_do_5_2_4_dupcook()
2190 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_4_dupcook()
2193 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_4_dupcook()
2201 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_4_dupcook()
2210 action = sctp_tietags_compare(new_asoc, asoc); in sctp_sf_do_5_2_4_dupcook()
2214 retval = sctp_sf_do_dupcook_a(net, ep, asoc, chunk, commands, in sctp_sf_do_5_2_4_dupcook()
2219 retval = sctp_sf_do_dupcook_b(net, ep, asoc, chunk, commands, in sctp_sf_do_5_2_4_dupcook()
2224 retval = sctp_sf_do_dupcook_c(net, ep, asoc, chunk, commands, in sctp_sf_do_5_2_4_dupcook()
2229 retval = sctp_sf_do_dupcook_d(net, ep, asoc, chunk, commands, in sctp_sf_do_5_2_4_dupcook()
2234 retval = sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_5_2_4_dupcook()
2246 SCTP_ASOC((struct sctp_association *)asoc)); in sctp_sf_do_5_2_4_dupcook()
2262 const struct sctp_association *asoc, in sctp_sf_shutdown_pending_abort() argument
2269 if (!sctp_vtag_verify_either(chunk, asoc)) in sctp_sf_shutdown_pending_abort()
2270 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_abort()
2283 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_abort()
2291 sctp_bind_addr_state(&asoc->base.bind_addr, &chunk->dest)) in sctp_sf_shutdown_pending_abort()
2292 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_abort()
2295 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_abort()
2297 return __sctp_sf_do_9_1_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_abort()
2308 const struct sctp_association *asoc, in sctp_sf_shutdown_sent_abort() argument
2315 if (!sctp_vtag_verify_either(chunk, asoc)) in sctp_sf_shutdown_sent_abort()
2316 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_abort()
2329 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_abort()
2337 sctp_bind_addr_state(&asoc->base.bind_addr, &chunk->dest)) in sctp_sf_shutdown_sent_abort()
2338 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_abort()
2341 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_abort()
2351 return __sctp_sf_do_9_1_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_abort()
2362 const struct sctp_association *asoc, in sctp_sf_shutdown_ack_sent_abort() argument
2370 return sctp_sf_shutdown_sent_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_ack_sent_abort()
2380 * (endpoint, asoc, chunk)
2383 * (asoc, reply_msg, msg_up, timers, counters)
2390 const struct sctp_association *asoc, in sctp_sf_cookie_echoed_err() argument
2398 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_cookie_echoed_err()
2399 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_echoed_err()
2405 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_cookie_echoed_err()
2415 return sctp_sf_do_5_2_6_stale(net, ep, asoc, type, in sctp_sf_cookie_echoed_err()
2424 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_echoed_err()
2445 * (endpoint, asoc, chunk)
2448 * (asoc, reply_msg, msg_up, timers, counters)
2455 const struct sctp_association *asoc, in sctp_sf_do_5_2_6_stale() argument
2460 int attempts = asoc->init_err_counter + 1; in sctp_sf_do_5_2_6_stale()
2467 if (attempts > asoc->max_init_attempts) { in sctp_sf_do_5_2_6_stale()
2499 bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; in sctp_sf_do_5_2_6_stale()
2500 reply = sctp_make_init(asoc, bp, GFP_ATOMIC, sizeof(bht)); in sctp_sf_do_5_2_6_stale()
2522 SCTP_TRANSPORT(asoc->peer.primary_path)); in sctp_sf_do_5_2_6_stale()
2568 * (endpoint, asoc, chunk)
2571 * (asoc, reply_msg, msg_up, timers, counters)
2578 const struct sctp_association *asoc, in sctp_sf_do_9_1_abort() argument
2585 if (!sctp_vtag_verify_either(chunk, asoc)) in sctp_sf_do_9_1_abort()
2586 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_1_abort()
2599 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_1_abort()
2607 sctp_bind_addr_state(&asoc->base.bind_addr, &chunk->dest)) in sctp_sf_do_9_1_abort()
2608 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_1_abort()
2611 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_1_abort()
2613 return __sctp_sf_do_9_1_abort(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_1_abort()
2619 const struct sctp_association *asoc, in __sctp_sf_do_9_1_abort() argument
2650 const struct sctp_association *asoc, in sctp_sf_cookie_wait_abort() argument
2659 if (!sctp_vtag_verify_either(chunk, asoc)) in sctp_sf_cookie_wait_abort()
2660 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_wait_abort()
2673 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_wait_abort()
2680 return sctp_stop_t1_and_abort(net, commands, error, ECONNREFUSED, asoc, in sctp_sf_cookie_wait_abort()
2690 const struct sctp_association *asoc, in sctp_sf_cookie_wait_icmp_abort() argument
2696 ENOPROTOOPT, asoc, in sctp_sf_cookie_wait_icmp_abort()
2706 const struct sctp_association *asoc, in sctp_sf_cookie_echoed_abort() argument
2714 return sctp_sf_cookie_wait_abort(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_echoed_abort()
2726 const struct sctp_association *asoc, in sctp_stop_t1_and_abort() argument
2770 * (endpoint, asoc, chunk)
2773 * (asoc, reply_msg, msg_up, timers, counters)
2780 const struct sctp_association *asoc, in sctp_sf_do_9_2_shutdown() argument
2791 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_9_2_shutdown()
2792 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_shutdown()
2796 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_9_2_shutdown()
2805 if (TSN_lt(ctsn, asoc->ctsn_ack_point)) { in sctp_sf_do_9_2_shutdown()
2807 asoc->ctsn_ack_point); in sctp_sf_do_9_2_shutdown()
2816 if (!TSN_lt(ctsn, asoc->next_tsn)) in sctp_sf_do_9_2_shutdown()
2817 return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_shutdown()
2823 ev = sctp_ulpevent_make_shutdown_event(asoc, 0, GFP_ATOMIC); in sctp_sf_do_9_2_shutdown()
2840 if (sctp_outq_is_empty(&asoc->outqueue)) { in sctp_sf_do_9_2_shutdown()
2841 disposition = sctp_sf_do_9_2_shutdown_ack(net, ep, asoc, type, in sctp_sf_do_9_2_shutdown()
2870 const struct sctp_association *asoc, in sctp_sf_do_9_2_shut_ctsn() argument
2879 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_9_2_shut_ctsn()
2880 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_shut_ctsn()
2884 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_9_2_shut_ctsn()
2890 if (TSN_lt(ctsn, asoc->ctsn_ack_point)) { in sctp_sf_do_9_2_shut_ctsn()
2892 asoc->ctsn_ack_point); in sctp_sf_do_9_2_shut_ctsn()
2901 if (!TSN_lt(ctsn, asoc->next_tsn)) in sctp_sf_do_9_2_shut_ctsn()
2902 return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_shut_ctsn()
2923 const struct sctp_association *asoc, in __sctp_sf_do_9_2_reshutack() argument
2932 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in __sctp_sf_do_9_2_reshutack()
2939 reply = sctp_make_shutdown_ack(asoc, chunk); in __sctp_sf_do_9_2_reshutack()
2961 const struct sctp_association *asoc, in sctp_sf_do_9_2_reshutack() argument
2968 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_reshutack()
2971 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_reshutack()
2974 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_reshutack()
2976 return __sctp_sf_do_9_2_reshutack(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_reshutack()
2997 * (endpoint, asoc, chunk)
3000 * (asoc, reply_msg, msg_up, timers, counters)
3006 const struct sctp_association *asoc, in sctp_sf_do_ecn_cwr() argument
3015 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_ecn_cwr()
3016 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_ecn_cwr()
3019 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_ecn_cwr()
3028 if (TSN_lte(asoc->last_ecne_tsn, lowest_tsn)) { in sctp_sf_do_ecn_cwr()
3053 * (endpoint, asoc, chunk)
3056 * (asoc, reply_msg, msg_up, timers, counters)
3062 const struct sctp_association *asoc, in sctp_sf_do_ecne() argument
3069 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_ecne()
3070 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_ecne()
3073 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_ecne()
3109 * (endpoint, asoc, chunk)
3112 * (asoc, reply_msg, msg_up, timers, counters)
3118 const struct sctp_association *asoc, in sctp_sf_eat_data_6_2() argument
3127 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_eat_data_6_2()
3130 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_data_6_2()
3133 if (!sctp_chunk_length_valid(chunk, sctp_datachk_len(&asoc->stream))) in sctp_sf_eat_data_6_2()
3134 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_data_6_2()
3137 error = sctp_eat_data(asoc, chunk, commands); in sctp_sf_eat_data_6_2()
3152 return sctp_sf_abort_violation(net, ep, asoc, chunk, commands, in sctp_sf_eat_data_6_2()
3154 sctp_datahdr_len(&asoc->stream)); in sctp_sf_eat_data_6_2()
3162 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE]) { in sctp_sf_eat_data_6_2()
3229 * (endpoint, asoc, chunk)
3232 * (asoc, reply_msg, msg_up, timers, counters)
3239 const struct sctp_association *asoc, in sctp_sf_eat_data_fast_4_4() argument
3247 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_eat_data_fast_4_4()
3250 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_data_fast_4_4()
3253 if (!sctp_chunk_length_valid(chunk, sctp_datachk_len(&asoc->stream))) in sctp_sf_eat_data_fast_4_4()
3254 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_data_fast_4_4()
3257 error = sctp_eat_data(asoc, chunk, commands); in sctp_sf_eat_data_fast_4_4()
3268 return sctp_sf_abort_violation(net, ep, asoc, chunk, commands, in sctp_sf_eat_data_fast_4_4()
3270 sctp_datahdr_len(&asoc->stream)); in sctp_sf_eat_data_fast_4_4()
3321 * (endpoint, asoc, chunk)
3324 * (asoc, reply_msg, msg_up, timers, counters)
3330 const struct sctp_association *asoc, in sctp_sf_eat_sack_6_2() argument
3339 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_eat_sack_6_2()
3340 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_sack_6_2()
3344 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_sack_6_2()
3351 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_sack_6_2()
3359 if (TSN_lte(asoc->next_tsn, ctsn)) in sctp_sf_eat_sack_6_2()
3360 return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); in sctp_sf_eat_sack_6_2()
3362 trace_sctp_probe(ep, asoc, chunk); in sctp_sf_eat_sack_6_2()
3370 if (TSN_lt(ctsn, asoc->ctsn_ack_point)) { in sctp_sf_eat_sack_6_2()
3372 asoc->ctsn_ack_point); in sctp_sf_eat_sack_6_2()
3407 const struct sctp_association *asoc, in sctp_sf_tabort_8_4_8() argument
3416 packet = sctp_ootb_pkt_new(net, asoc, chunk); in sctp_sf_tabort_8_4_8()
3420 /* Make an ABORT. The T bit will be set if the asoc in sctp_sf_tabort_8_4_8()
3423 abort = sctp_make_abort(asoc, chunk, 0); in sctp_sf_tabort_8_4_8()
3443 sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_tabort_8_4_8()
3457 const struct sctp_association *asoc, in sctp_sf_operr_notify() argument
3465 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_operr_notify()
3466 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_operr_notify()
3470 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_operr_notify()
3474 return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, in sctp_sf_operr_notify()
3495 const struct sctp_association *asoc, in sctp_sf_do_9_2_final() argument
3504 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_9_2_final()
3505 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_9_2_final()
3509 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_9_2_final()
3516 ev = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_SHUTDOWN_COMP, in sctp_sf_do_9_2_final()
3522 reply = sctp_make_shutdown_complete(asoc, chunk); in sctp_sf_do_9_2_final()
3578 const struct sctp_association *asoc, in sctp_sf_ootb() argument
3592 if (asoc && !sctp_vtag_verify(chunk, asoc)) in sctp_sf_ootb()
3593 asoc = NULL; in sctp_sf_ootb()
3599 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_ootb()
3605 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_ootb()
3620 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_ootb()
3643 return sctp_sf_shut_8_4_5(net, ep, asoc, type, arg, commands); in sctp_sf_ootb()
3645 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_ootb()
3647 return sctp_sf_tabort_8_4_8(net, ep, asoc, type, arg, commands); in sctp_sf_ootb()
3664 * (endpoint, asoc, type, arg, commands)
3674 const struct sctp_association *asoc, in sctp_sf_shut_8_4_5() argument
3683 packet = sctp_ootb_pkt_new(net, asoc, chunk); in sctp_sf_shut_8_4_5()
3688 * The T bit will be set if the asoc is NULL. in sctp_sf_shut_8_4_5()
3690 shut = sctp_make_shutdown_complete(asoc, chunk); in sctp_sf_shut_8_4_5()
3714 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_shut_8_4_5()
3730 const struct sctp_association *asoc, in sctp_sf_do_8_5_1_E_sa() argument
3737 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_8_5_1_E_sa()
3738 asoc = NULL; in sctp_sf_do_8_5_1_E_sa()
3742 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_8_5_1_E_sa()
3758 const struct sctp_association *asoc, in sctp_sf_do_asconf() argument
3769 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_do_asconf()
3772 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_asconf()
3777 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_asconf()
3786 if (!asoc->peer.asconf_capable || in sctp_sf_do_asconf()
3788 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_asconf()
3794 if (!sctp_verify_asconf(asoc, chunk, true, &err_param)) in sctp_sf_do_asconf()
3795 return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, in sctp_sf_do_asconf()
3802 if (serial == asoc->peer.addip_serial + 1) { in sctp_sf_do_asconf()
3807 sctp_assoc_clean_asconf_ack_cache(asoc); in sctp_sf_do_asconf()
3818 asoc, chunk); in sctp_sf_do_asconf()
3821 } else if (serial < asoc->peer.addip_serial + 1) { in sctp_sf_do_asconf()
3834 asconf_ack = sctp_assoc_lookup_asconf_ack(asoc, hdr->serial); in sctp_sf_do_asconf()
3861 if (asoc->new_transport) { in sctp_sf_do_asconf()
3862 sctp_sf_heartbeat(ep, asoc, type, asoc->new_transport, commands); in sctp_sf_do_asconf()
3863 ((struct sctp_association *)asoc)->new_transport = NULL; in sctp_sf_do_asconf()
3872 struct sctp_association *asoc, in sctp_send_next_asconf() argument
3879 if (list_empty(&asoc->addip_chunk_list)) in sctp_send_next_asconf()
3882 entry = asoc->addip_chunk_list.next; in sctp_send_next_asconf()
3887 asoc->addip_last_asconf = asconf; in sctp_send_next_asconf()
3889 return sctp_sf_do_prm_asconf(net, ep, asoc, type, asconf, commands); in sctp_send_next_asconf()
3899 const struct sctp_association *asoc, in sctp_sf_do_asconf_ack() argument
3904 struct sctp_chunk *last_asconf = asoc->addip_last_asconf; in sctp_sf_do_asconf_ack()
3911 if (!sctp_vtag_verify(asconf_ack, asoc)) { in sctp_sf_do_asconf_ack()
3914 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_asconf_ack()
3920 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_asconf_ack()
3929 if (!asoc->peer.asconf_capable || in sctp_sf_do_asconf_ack()
3931 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_asconf_ack()
3937 if (!sctp_verify_asconf(asoc, asconf_ack, false, &err_param)) in sctp_sf_do_asconf_ack()
3938 return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, in sctp_sf_do_asconf_ack()
3945 sent_serial = asoc->addip_serial - 1; in sctp_sf_do_asconf_ack()
3955 !(asoc->addip_last_asconf)) { in sctp_sf_do_asconf_ack()
3956 abort = sctp_make_abort(asoc, asconf_ack, in sctp_sf_do_asconf_ack()
3978 if ((rcvd_serial == sent_serial) && asoc->addip_last_asconf) { in sctp_sf_do_asconf_ack()
3982 if (!sctp_process_asconf_ack((struct sctp_association *)asoc, in sctp_sf_do_asconf_ack()
3985 (struct sctp_association *)asoc, in sctp_sf_do_asconf_ack()
3988 abort = sctp_make_abort(asoc, asconf_ack, in sctp_sf_do_asconf_ack()
4014 const struct sctp_association *asoc, in sctp_sf_do_reconf() argument
4024 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_do_reconf()
4027 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_do_reconf()
4032 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_do_reconf()
4035 if (!sctp_verify_reconf(asoc, chunk, &err_param)) in sctp_sf_do_reconf()
4036 return sctp_sf_violation_paramlen(net, ep, asoc, type, arg, in sctp_sf_do_reconf()
4046 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4049 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4052 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4055 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4058 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4061 (struct sctp_association *)asoc, param, &ev); in sctp_sf_do_reconf()
4091 const struct sctp_association *asoc, in sctp_sf_eat_fwd_tsn() argument
4101 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_eat_fwd_tsn()
4104 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_fwd_tsn()
4107 if (!asoc->peer.prsctp_capable) in sctp_sf_eat_fwd_tsn()
4108 return sctp_sf_unk_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_eat_fwd_tsn()
4111 if (!sctp_chunk_length_valid(chunk, sctp_ftsnchk_len(&asoc->stream))) in sctp_sf_eat_fwd_tsn()
4112 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_fwd_tsn()
4127 if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) in sctp_sf_eat_fwd_tsn()
4130 if (!asoc->stream.si->validate_ftsn(chunk)) in sctp_sf_eat_fwd_tsn()
4134 if (len > sctp_ftsnhdr_len(&asoc->stream)) in sctp_sf_eat_fwd_tsn()
4139 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE]) { in sctp_sf_eat_fwd_tsn()
4158 const struct sctp_association *asoc, in sctp_sf_eat_fwd_tsn_fast() argument
4168 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_eat_fwd_tsn_fast()
4171 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_fwd_tsn_fast()
4174 if (!asoc->peer.prsctp_capable) in sctp_sf_eat_fwd_tsn_fast()
4175 return sctp_sf_unk_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_eat_fwd_tsn_fast()
4178 if (!sctp_chunk_length_valid(chunk, sctp_ftsnchk_len(&asoc->stream))) in sctp_sf_eat_fwd_tsn_fast()
4179 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_fwd_tsn_fast()
4194 if (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0) in sctp_sf_eat_fwd_tsn_fast()
4197 if (!asoc->stream.si->validate_ftsn(chunk)) in sctp_sf_eat_fwd_tsn_fast()
4201 if (len > sctp_ftsnhdr_len(&asoc->stream)) in sctp_sf_eat_fwd_tsn_fast()
4244 const struct sctp_association *asoc, in sctp_sf_authenticate() argument
4262 if (!sctp_auth_asoc_verify_hmac_id(asoc, auth_hdr->hmac_id)) in sctp_sf_authenticate()
4269 if (key_id != asoc->active_key_id) { in sctp_sf_authenticate()
4270 sh_key = sctp_auth_get_shkey(asoc, key_id); in sctp_sf_authenticate()
4300 sctp_auth_calculate_hmac(asoc, chunk->skb, in sctp_sf_authenticate()
4320 const struct sctp_association *asoc, in sctp_sf_eat_auth() argument
4330 if (!asoc->peer.auth_capable) in sctp_sf_eat_auth()
4331 return sctp_sf_unk_chunk(net, ep, asoc, type, arg, commands); in sctp_sf_eat_auth()
4333 if (!sctp_vtag_verify(chunk, asoc)) { in sctp_sf_eat_auth()
4336 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_auth()
4341 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_auth()
4345 error = sctp_sf_authenticate(asoc, chunk); in sctp_sf_eat_auth()
4351 err_chunk = sctp_make_op_error(asoc, chunk, in sctp_sf_eat_auth()
4362 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_eat_auth()
4365 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_eat_auth()
4375 if (asoc->active_key_id != ntohs(auth_hdr->shkey_id)) { in sctp_sf_eat_auth()
4378 ev = sctp_ulpevent_make_authkey(asoc, ntohs(auth_hdr->shkey_id), in sctp_sf_eat_auth()
4416 const struct sctp_association *asoc, in sctp_sf_unk_chunk() argument
4427 if (!sctp_vtag_verify(unk_chunk, asoc)) in sctp_sf_unk_chunk()
4428 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_unk_chunk()
4435 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_unk_chunk()
4441 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_unk_chunk()
4445 err_chunk = sctp_make_op_error(asoc, unk_chunk, in sctp_sf_unk_chunk()
4455 sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_unk_chunk()
4463 err_chunk = sctp_make_op_error(asoc, unk_chunk, in sctp_sf_unk_chunk()
4487 * (endpoint, asoc, chunk)
4490 * (asoc, reply_msg, msg_up, timers, counters)
4496 const struct sctp_association *asoc, in sctp_sf_discard_chunk() argument
4503 if (asoc && !sctp_vtag_verify(chunk, asoc)) in sctp_sf_discard_chunk()
4504 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_discard_chunk()
4511 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_discard_chunk()
4530 * (endpoint, asoc, chunk)
4533 * (asoc, reply_msg, msg_up, timers, counters)
4539 const struct sctp_association *asoc, in sctp_sf_pdiscard() argument
4556 * (endpoint, asoc, chunk)
4559 * (asoc, reply_msg, msg_up, timers, counters)
4566 const struct sctp_association *asoc, in sctp_sf_violation() argument
4573 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_violation()
4574 return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); in sctp_sf_violation()
4578 return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, in sctp_sf_violation()
4590 const struct sctp_association *asoc, in sctp_sf_abort_violation() argument
4611 if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) in sctp_sf_abort_violation()
4615 abort = sctp_make_abort_violation(asoc, chunk, payload, paylen); in sctp_sf_abort_violation()
4619 if (asoc) { in sctp_sf_abort_violation()
4622 !asoc->peer.i.init_tag) { in sctp_sf_abort_violation()
4640 if (asoc->state <= SCTP_STATE_COOKIE_ECHOED) { in sctp_sf_abort_violation()
4655 packet = sctp_ootb_pkt_new(net, asoc, chunk); in sctp_sf_abort_violation()
4676 sctp_sf_pdiscard(net, ep, asoc, SCTP_ST_CHUNK(0), arg, commands); in sctp_sf_abort_violation()
4697 * (endpoint, asoc, chunk)
4707 const struct sctp_association *asoc, in sctp_sf_violation_chunklen() argument
4714 return sctp_sf_abort_violation(net, ep, asoc, arg, commands, err_str, in sctp_sf_violation_chunklen()
4727 const struct sctp_association *asoc, in sctp_sf_violation_paramlen() argument
4736 if (sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)) in sctp_sf_violation_paramlen()
4740 abort = sctp_make_violation_paramlen(asoc, chunk, param); in sctp_sf_violation_paramlen()
4755 sctp_sf_pdiscard(net, ep, asoc, SCTP_ST_CHUNK(0), arg, commands); in sctp_sf_violation_paramlen()
4770 const struct sctp_association *asoc, in sctp_sf_violation_ctsn() argument
4777 return sctp_sf_abort_violation(net, ep, asoc, arg, commands, err_str, in sctp_sf_violation_ctsn()
4790 const struct sctp_association *asoc, in sctp_sf_violation_chunk() argument
4797 if (!asoc) in sctp_sf_violation_chunk()
4798 return sctp_sf_violation(net, ep, asoc, type, arg, commands); in sctp_sf_violation_chunk()
4800 return sctp_sf_abort_violation(net, ep, asoc, arg, commands, err_str, in sctp_sf_violation_chunk()
4849 * [This is the argument asoc.]
4853 * [This is asoc->peer.active_path.]
4865 const struct sctp_association *asoc, in sctp_sf_do_prm_asoc() argument
4888 repl = sctp_make_init(asoc, &asoc->base.bind_addr, GFP_ATOMIC, 0); in sctp_sf_do_prm_asoc()
4899 my_asoc = (struct sctp_association *)asoc; in sctp_sf_do_prm_asoc()
4977 const struct sctp_association *asoc, in sctp_sf_do_prm_send() argument
5017 const struct sctp_association *asoc, in sctp_sf_do_9_2_prm_shutdown() argument
5036 if (sctp_outq_is_empty(&asoc->outqueue)) { in sctp_sf_do_9_2_prm_shutdown()
5037 disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type, in sctp_sf_do_9_2_prm_shutdown()
5074 const struct sctp_association *asoc, in sctp_sf_do_9_1_prm_abort() argument
5111 const struct sctp_association *asoc, in sctp_sf_error_closed() argument
5126 const struct sctp_association *asoc, in sctp_sf_error_shutdown() argument
5142 * (endpoint, asoc)
5153 const struct sctp_association *asoc, in sctp_sf_cookie_wait_prm_shutdown() argument
5177 * (endpoint, asoc)
5188 const struct sctp_association *asoc, in sctp_sf_cookie_echoed_prm_shutdown() argument
5196 return sctp_sf_cookie_wait_prm_shutdown(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_echoed_prm_shutdown()
5205 * (endpoint, asoc)
5216 const struct sctp_association *asoc, in sctp_sf_cookie_wait_prm_abort() argument
5254 * (endpoint, asoc)
5265 const struct sctp_association *asoc, in sctp_sf_cookie_echoed_prm_abort() argument
5273 return sctp_sf_cookie_wait_prm_abort(net, ep, asoc, type, arg, commands); in sctp_sf_cookie_echoed_prm_abort()
5280 * (endpoint, asoc)
5291 const struct sctp_association *asoc, in sctp_sf_shutdown_pending_prm_abort() argument
5300 return sctp_sf_do_9_1_prm_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_pending_prm_abort()
5307 * (endpoint, asoc)
5318 const struct sctp_association *asoc, in sctp_sf_shutdown_sent_prm_abort() argument
5331 return sctp_sf_do_9_1_prm_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_sent_prm_abort()
5338 * (endpoint, asoc)
5349 const struct sctp_association *asoc, in sctp_sf_shutdown_ack_sent_prm_abort() argument
5357 return sctp_sf_shutdown_sent_prm_abort(net, ep, asoc, type, arg, commands); in sctp_sf_shutdown_ack_sent_prm_abort()
5385 const struct sctp_association *asoc, in sctp_sf_do_prm_requestheartbeat() argument
5390 if (SCTP_DISPOSITION_NOMEM == sctp_sf_heartbeat(ep, asoc, type, in sctp_sf_do_prm_requestheartbeat()
5417 const struct sctp_association *asoc, in sctp_sf_do_prm_asconf() argument
5434 const struct sctp_association *asoc, in sctp_sf_do_prm_reconf() argument
5453 const struct sctp_association *asoc, in sctp_sf_ignore_primitive() argument
5477 const struct sctp_association *asoc, in sctp_sf_do_no_pending_tsn() argument
5484 event = sctp_ulpevent_make_sender_dry_event(asoc, GFP_ATOMIC); in sctp_sf_do_no_pending_tsn()
5509 const struct sctp_association *asoc, in sctp_sf_do_9_2_start_shutdown() argument
5521 reply = sctp_make_shutdown(asoc, arg); in sctp_sf_do_9_2_start_shutdown()
5541 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE]) in sctp_sf_do_9_2_start_shutdown()
5579 const struct sctp_association *asoc, in sctp_sf_do_9_2_shutdown_ack() argument
5595 if (!sctp_vtag_verify(chunk, asoc)) in sctp_sf_do_9_2_shutdown_ack()
5596 return sctp_sf_pdiscard(net, ep, asoc, type, arg, in sctp_sf_do_9_2_shutdown_ack()
5602 return sctp_sf_violation_chunklen(net, ep, asoc, type, in sctp_sf_do_9_2_shutdown_ack()
5609 reply = sctp_make_shutdown_ack(asoc, chunk); in sctp_sf_do_9_2_shutdown_ack()
5622 if (asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE]) in sctp_sf_do_9_2_shutdown_ack()
5652 const struct sctp_association *asoc, in sctp_sf_ignore_other() argument
5680 const struct sctp_association *asoc, in sctp_sf_do_6_3_3_rtx() argument
5689 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_sf_do_6_3_3_rtx()
5690 if (asoc->peer.zero_window_announced && in sctp_sf_do_6_3_3_rtx()
5691 asoc->state == SCTP_STATE_SHUTDOWN_PENDING) { in sctp_sf_do_6_3_3_rtx()
5768 const struct sctp_association *asoc, in sctp_sf_do_6_2_sack() argument
5784 * (endpoint, asoc)
5800 const struct sctp_association *asoc, in sctp_sf_t1_init_timer_expire() argument
5805 int attempts = asoc->init_err_counter + 1; in sctp_sf_t1_init_timer_expire()
5813 if (attempts <= asoc->max_init_attempts) { in sctp_sf_t1_init_timer_expire()
5814 bp = (struct sctp_bind_addr *) &asoc->base.bind_addr; in sctp_sf_t1_init_timer_expire()
5815 repl = sctp_make_init(asoc, bp, GFP_ATOMIC, 0); in sctp_sf_t1_init_timer_expire()
5831 asoc->max_init_attempts); in sctp_sf_t1_init_timer_expire()
5849 * (endpoint, asoc)
5865 const struct sctp_association *asoc, in sctp_sf_t1_cookie_timer_expire() argument
5870 int attempts = asoc->init_err_counter + 1; in sctp_sf_t1_cookie_timer_expire()
5877 if (attempts <= asoc->max_init_attempts) { in sctp_sf_t1_cookie_timer_expire()
5878 repl = sctp_make_cookie_echo(asoc, NULL); in sctp_sf_t1_cookie_timer_expire()
5916 const struct sctp_association *asoc, in sctp_sf_t2_timer_expire() argument
5927 ((struct sctp_association *)asoc)->shutdown_retries++; in sctp_sf_t2_timer_expire()
5929 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_sf_t2_timer_expire()
5940 switch (asoc->state) { in sctp_sf_t2_timer_expire()
5942 reply = sctp_make_shutdown(asoc, NULL); in sctp_sf_t2_timer_expire()
5946 reply = sctp_make_shutdown_ack(asoc, NULL); in sctp_sf_t2_timer_expire()
5961 if (asoc->shutdown_last_sent_to) in sctp_sf_t2_timer_expire()
5963 SCTP_TRANSPORT(asoc->shutdown_last_sent_to)); in sctp_sf_t2_timer_expire()
5987 const struct sctp_association *asoc, in sctp_sf_t4_timer_expire() argument
5992 struct sctp_chunk *chunk = asoc->addip_last_asconf; in sctp_sf_t4_timer_expire()
6013 if (asoc->overall_error_count >= asoc->max_retrans) { in sctp_sf_t4_timer_expire()
6036 sctp_chunk_hold(asoc->addip_last_asconf); in sctp_sf_t4_timer_expire()
6038 SCTP_CHUNK(asoc->addip_last_asconf)); in sctp_sf_t4_timer_expire()
6059 const struct sctp_association *asoc, in sctp_sf_t5_timer_expire() argument
6070 reply = sctp_make_abort(asoc, NULL, 0); in sctp_sf_t5_timer_expire()
6096 const struct sctp_association *asoc, in sctp_sf_autoclose_timer_expire() argument
6117 if (sctp_outq_is_empty(&asoc->outqueue)) { in sctp_sf_autoclose_timer_expire()
6118 disposition = sctp_sf_do_9_2_start_shutdown(net, ep, asoc, type, in sctp_sf_autoclose_timer_expire()
6133 * (endpoint, asoc, chunk)
6139 const struct sctp_association *asoc, in sctp_sf_not_impl() argument
6150 * (endpoint, asoc, chunk)
6156 const struct sctp_association *asoc, in sctp_sf_bug() argument
6170 * (endpoint, asoc, chunk)
6176 const struct sctp_association *asoc, in sctp_sf_timer_ignore() argument
6221 const struct sctp_association *asoc, in sctp_abort_pkt_new() argument
6228 packet = sctp_ootb_pkt_new(net, asoc, chunk); in sctp_abort_pkt_new()
6232 * The T bit will be set if the asoc is NULL. in sctp_abort_pkt_new()
6234 abort = sctp_make_abort(asoc, chunk, paylen); in sctp_abort_pkt_new()
6262 const struct sctp_association *asoc, in sctp_ootb_pkt_new() argument
6277 if (asoc) { in sctp_ootb_pkt_new()
6292 vtag = asoc->peer.i.init_tag; in sctp_ootb_pkt_new()
6344 const struct sctp_association *asoc, in sctp_send_stale_cookie_err() argument
6352 packet = sctp_ootb_pkt_new(net, asoc, chunk); in sctp_send_stale_cookie_err()
6373 static int sctp_eat_data(const struct sctp_association *asoc, in sctp_eat_data() argument
6377 struct sctp_tsnmap *map = (struct sctp_tsnmap *)&asoc->peer.tsn_map; in sctp_eat_data()
6378 struct sock *sk = asoc->base.sk; in sctp_eat_data()
6389 skb_pull(chunk->skb, sctp_datahdr_len(&asoc->stream)); in sctp_eat_data()
6406 if (asoc->peer.ecn_capable && !chunk->ecn_ce_done) { in sctp_eat_data()
6417 tmp = sctp_tsnmap_check(&asoc->peer.tsn_map, tsn); in sctp_eat_data()
6422 if (chunk->asoc) in sctp_eat_data()
6423 chunk->asoc->stats.outofseqtsns++; in sctp_eat_data()
6437 datalen -= sctp_datachk_len(&asoc->stream); in sctp_eat_data()
6442 if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) { in sctp_eat_data()
6455 if ((!chunk->data_accepted) && (!asoc->rwnd || asoc->rwnd_over || in sctp_eat_data()
6456 (datalen > asoc->rwnd + asoc->frag_point))) { in sctp_eat_data()
6470 __func__, tsn, datalen, asoc->rwnd); in sctp_eat_data()
6503 err = sctp_make_abort_no_data(asoc, chunk, tsn); in sctp_eat_data()
6528 if (chunk->asoc) in sctp_eat_data()
6529 chunk->asoc->stats.iuodchunks++; in sctp_eat_data()
6532 if (chunk->asoc) in sctp_eat_data()
6533 chunk->asoc->stats.iodchunks++; in sctp_eat_data()
6544 if (ntohs(data_hdr->stream) >= asoc->stream.incnt) { in sctp_eat_data()
6548 err = sctp_make_op_error(asoc, chunk, SCTP_ERROR_INV_STRM, in sctp_eat_data()
6565 if (!asoc->stream.si->validate_data(chunk)) in sctp_eat_data()