MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_t1init_timer

Function sctp_t1init_timer

freebsd/netinet/sctp_timer.c:1004–1045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004int
1005sctp_t1init_timer(struct sctp_inpcb *inp,
1006 struct sctp_tcb *stcb,
1007 struct sctp_nets *net)
1008{
1009 /* bump the thresholds */
1010 if (stcb->asoc.delayed_connection) {
1011 /*
1012 * special hook for delayed connection. The library did NOT
1013 * complete the rest of its sends.
1014 */
1015 stcb->asoc.delayed_connection = 0;
1016 sctp_send_initiate(inp, stcb, SCTP_SO_NOT_LOCKED);
1017 return (0);
1018 }
1019 if (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT) {
1020 return (0);
1021 }
1022 if (sctp_threshold_management(inp, stcb, net,
1023 stcb->asoc.max_init_times)) {
1024 /* Association was destroyed */
1025 return (1);
1026 }
1027 stcb->asoc.dropped_special_cnt = 0;
1028 sctp_backoff_on_timeout(stcb, stcb->asoc.primary_destination, 1, 0, 0);
1029 if (stcb->asoc.initial_init_rto_max < net->RTO) {
1030 net->RTO = stcb->asoc.initial_init_rto_max;
1031 }
1032 if (stcb->asoc.numnets > 1) {
1033 /* If we have more than one addr use it */
1034 struct sctp_nets *alt;
1035
1036 alt = sctp_find_alternate_net(stcb, stcb->asoc.primary_destination, 0);
1037 if (alt != stcb->asoc.primary_destination) {
1038 sctp_move_chunks_from_net(stcb, stcb->asoc.primary_destination);
1039 stcb->asoc.primary_destination = alt;
1040 }
1041 }
1042 /* Send out a new init */
1043 sctp_send_initiate(inp, stcb, SCTP_SO_NOT_LOCKED);
1044 return (0);
1045}
1046
1047/*
1048 * For cookie and asconf we actually need to find and mark for resend, then

Callers 1

sctp_timeout_handlerFunction · 0.85

Calls 5

sctp_send_initiateFunction · 0.85
sctp_backoff_on_timeoutFunction · 0.85
sctp_find_alternate_netFunction · 0.85

Tested by

no test coverage detected