File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ echo_clients_command_fn (vlib_main_t * vm,
765765 /* Fire off connect requests */
766766 time_before_connects = vlib_time_now (vm );
767767 if ((error = echo_clients_connect (vm , n_clients )))
768- return error ;
768+ goto cleanup ;
769769
770770 /* Park until the sessions come up, or ten seconds elapse... */
771771 vlib_process_wait_for_event_or_clock (vm , syn_timeout );
Original file line number Diff line number Diff line change @@ -1076,24 +1076,25 @@ tcp_send_fin (tcp_connection_t * tc)
10761076 u32 bi ;
10771077 u8 fin_snt = 0 ;
10781078
1079- tcp_retransmit_timer_force_update (tc );
1079+ fin_snt = tc -> flags & TCP_CONN_FINSNT ;
1080+ if (fin_snt )
1081+ tc -> snd_nxt = tc -> snd_una ;
1082+
10801083 if (PREDICT_FALSE (tcp_get_free_buffer_index (tm , & bi )))
10811084 {
10821085 /* Out of buffers so program fin retransmit ASAP */
10831086 tcp_timer_update (tc , TCP_TIMER_RETRANSMIT , 1 );
1084- tc -> flags |= TCP_CONN_FINSNT ;
1085- tc -> snd_una_max += 1 ;
1086- tc -> snd_nxt = tc -> snd_una_max ;
1087- return ;
1087+ goto post_enqueue ;
10881088 }
10891089
1090+ tcp_retransmit_timer_force_update (tc );
10901091 b = vlib_get_buffer (vm , bi );
10911092 tcp_init_buffer (vm , b );
1092- fin_snt = tc -> flags & TCP_CONN_FINSNT ;
1093- if (fin_snt )
1094- tc -> snd_nxt = tc -> snd_una ;
10951093 tcp_make_fin (tc , b );
10961094 tcp_enqueue_to_output_now (vm , b , bi , tc -> c_is_ip4 );
1095+ TCP_EVT_DBG (TCP_EVT_FIN_SENT , tc );
1096+
1097+ post_enqueue :
10971098 if (!fin_snt )
10981099 {
10991100 tc -> flags |= TCP_CONN_FINSNT ;
@@ -1106,7 +1107,6 @@ tcp_send_fin (tcp_connection_t * tc)
11061107 {
11071108 tc -> snd_nxt = tc -> snd_una_max ;
11081109 }
1109- TCP_EVT_DBG (TCP_EVT_FIN_SENT , tc );
11101110}
11111111
11121112always_inline u8
You can’t perform that action at this time.
0 commit comments