summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/application.c3
-rw-r--r--src/vnet/session/session.c4
-rwxr-xr-xsrc/vnet/session/session_api.c1
-rw-r--r--src/vnet/session/session_lookup.c2
-rw-r--r--src/vnet/session/transport_types.h10
5 files changed, 15 insertions, 5 deletions
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 0b8c8d4c70c..ab678888a71 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -212,7 +212,8 @@ app_listener_alloc_and_init (application_t * app,
* are not related to network fibs, i.e., cannot be added as
* connections */
tc = session_get_transport (ls);
- session_lookup_add_connection (tc, lh);
+ if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
+ session_lookup_add_connection (tc, lh);
}
if (!ls)
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index faaaad4bada..d378d6d2426 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -946,7 +946,6 @@ session_open_cl (u32 app_wrk_index, session_endpoint_t * rmt, u32 opaque)
sh = session_handle (s);
session_lookup_add_connection (tc, sh);
-
return app_worker_connect_notify (app_wrk, s, opaque);
}
@@ -1079,7 +1078,8 @@ session_stop_listen (session_t * s)
if (!tc)
return VNET_API_ERROR_ADDRESS_NOT_IN_USE;
- session_lookup_del_connection (tc);
+ if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
+ session_lookup_del_connection (tc);
transport_stop_listen (tp, s->connection_index);
return 0;
}
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 9e7a42d2d39..e8550d6c2a8 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -640,6 +640,7 @@ vl_api_unbind_uri_t_handler (vl_api_unbind_uri_t * mp)
{
a->uri = (char *) mp->uri;
a->app_index = app->app_index;
+ a->wrk_map_index = 0;
rv = vnet_unbind_uri (a);
}
else
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index b74973d726b..f1e715e4aab 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -338,6 +338,8 @@ session_lookup_del_session (session_t * s)
transport_connection_t *ts;
ts = transport_get_connection (session_get_transport_proto (s),
s->connection_index, s->thread_index);
+ if (ts->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP)
+ return 0;
return session_lookup_del_connection (ts);
}
diff --git a/src/vnet/session/transport_types.h b/src/vnet/session/transport_types.h
index 87daa76005e..e15c6bbb76f 100644
--- a/src/vnet/session/transport_types.h
+++ b/src/vnet/session/transport_types.h
@@ -39,6 +39,14 @@ typedef enum transport_service_type_
TRANSPORT_N_SERVICES
} transport_service_type_t;
+typedef enum transport_connection_flags_
+{
+ TRANSPORT_CONNECTION_F_IS_TX_PACED = 1 << 0,
+ TRANSPORT_CONNECTION_F_NO_LOOKUP = 1 << 1, /**< Don't register connection in lookup
+ Does not apply to local apps and
+ transports using the network layer (udp/tcp) */
+} transport_connection_flags_t;
+
typedef struct _transport_stats
{
u64 tx_bytes;
@@ -120,8 +128,6 @@ typedef struct _transport_connection
#define c_flags connection.flags
} transport_connection_t;
-#define TRANSPORT_CONNECTION_F_IS_TX_PACED 1 << 0
-
typedef enum _transport_proto
{
TRANSPORT_PROTO_TCP,