Skip to content

Commit 34d2d89

Browse files
micchiedavem330
authored andcommitted
sctp: fasthandoff with ASCONF at server-node
Retransmit chunks to newly confirmed destination when ASCONF and HEARTBEAT negotiation has success with a single-homed peer. Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ddc4bbe commit 34d2d89

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

net/sctp/sm_sideeffect.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
666666
struct sctp_chunk *chunk)
667667
{
668668
sctp_sender_hb_info_t *hbinfo;
669+
int was_unconfirmed = 0;
669670

670671
/* 8.3 Upon the receipt of the HEARTBEAT ACK, the sender of the
671672
* HEARTBEAT should clear the error counter of the destination
@@ -692,9 +693,11 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
692693
/* Mark the destination transport address as active if it is not so
693694
* marked.
694695
*/
695-
if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED))
696+
if ((t->state == SCTP_INACTIVE) || (t->state == SCTP_UNCONFIRMED)) {
697+
was_unconfirmed = 1;
696698
sctp_assoc_control_transport(asoc, t, SCTP_TRANSPORT_UP,
697699
SCTP_HEARTBEAT_SUCCESS);
700+
}
698701

699702
/* The receiver of the HEARTBEAT ACK should also perform an
700703
* RTT measurement for that destination transport address
@@ -712,6 +715,9 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,
712715
/* Update the heartbeat timer. */
713716
if (!mod_timer(&t->hb_timer, sctp_transport_timeout(t)))
714717
sctp_transport_hold(t);
718+
719+
if (was_unconfirmed && asoc->peer.transport_count == 1)
720+
sctp_transport_immediate_rtx(t);
715721
}
716722

717723

0 commit comments

Comments
 (0)