summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c3
-rw-r--r--src/vnet/session/transport.c6
-rw-r--r--src/vnet/session/transport.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index ee02526c190..cfba31ec406 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -142,7 +142,8 @@ session_alloc_for_connection (transport_connection_t * tc)
stream_session_t *s;
u32 thread_index = tc->thread_index;
- ASSERT (thread_index == vlib_get_thread_index ());
+ ASSERT (thread_index == vlib_get_thread_index ()
+ || transport_protocol_is_cl (tc->proto));
s = session_alloc (thread_index);
s->session_type = session_type_from_proto_and_ip (tc->proto, tc->is_ip4);
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index b3d42d0f7da..a401190e426 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -207,6 +207,12 @@ transport_protocol_tx_fn_type (transport_proto_t tp)
return tp_vfts[tp].tx_type;
}
+u8
+transport_protocol_is_cl (transport_proto_t tp)
+{
+ return (tp_vfts[tp].service_type == TRANSPORT_SERVICE_CL);
+}
+
#define PORT_MASK ((1 << 16)- 1)
void
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 8340fd859ac..e29f3ca9557 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -131,6 +131,7 @@ int transport_alloc_local_endpoint (u8 proto, transport_endpoint_t * rmt,
ip46_address_t * lcl_addr,
u16 * lcl_port);
void transport_endpoint_cleanup (u8 proto, ip46_address_t * lcl_ip, u16 port);
+u8 transport_protocol_is_cl (transport_proto_t tp);
void transport_init (void);
#endif /* VNET_VNET_URI_TRANSPORT_H_ */