summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_cli.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-07 19:39:43 -0700
committerFlorin Coras <florin.coras@gmail.com>2021-05-10 20:53:32 +0000
commitea72764204dac0a1ab6412bc27b758faead2ca10 (patch)
treed22e849e0e0a84b11c42373c1b97fb6b715d3098 /src/vnet/session/session_cli.c
parente2272ac27c31b8cf7ecf0ff8d4244f90034a09f4 (diff)
session: use half-open sessions for vc establishment
Use half-open sessions to track virtual circuit connection establishment. These sesssions can only be allocated and freed by the thread that allocates half-open connections (main). Consequently, they can only be freed on half-open cleanup notifications from transports. Goal is to simplify state tracking within the session layer but it's also a first step towards allowing builtin apps to track and cleanup outstanding connects. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8a535906d13eb7f8966deb82333839de80f8049f
Diffstat (limited to 'src/vnet/session/session_cli.c')
-rw-r--r--src/vnet/session/session_cli.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index 2ca9630996a..1505a95f41a 100644
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -144,8 +144,12 @@ format_session (u8 * s, va_list * args)
}
else if (ss->session_state == SESSION_STATE_CONNECTING)
{
- s = format (s, "%-40U%v", format_transport_half_open_connection,
- tp, ss->connection_index, ss->thread_index, str);
+ if (ss->flags & SESSION_F_HALF_OPEN)
+ s = format (s, "%U%v", format_transport_half_open_connection, tp,
+ ss->connection_index, ss->thread_index, verbose, str);
+ else
+ s = format (s, "%U", format_transport_connection, tp,
+ ss->connection_index, ss->thread_index, verbose);
}
else
{