tcp: improve waitclose in closing states
Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 2327b9a..bd0fa9a 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -562,6 +562,13 @@
return (tcp_connection_t *) tconn;
}
+always_inline void
+tcp_connection_set_state (tcp_connection_t * tc, tcp_state_t state)
+{
+ tc->state = state;
+ TCP_EVT_DBG (TCP_EVT_STATE_CHANGE, tc);
+}
+
void tcp_connection_close (tcp_connection_t * tc);
void tcp_connection_cleanup (tcp_connection_t * tc);
void tcp_connection_del (tcp_connection_t * tc);