Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
session: free session after transport and app confirm
[vpp.git]
/
src
/
vnet
/
session
/
application_interface.c
diff --git
a/src/vnet/session/application_interface.c
b/src/vnet/session/application_interface.c
index
f0722d6
..
c3c84fd
100644
(file)
--- a/
src/vnet/session/application_interface.c
+++ b/
src/vnet/session/application_interface.c
@@
-163,7
+163,12
@@
session_endpoint_update_for_app (session_endpoint_cfg_t * sep,
* that "supports" app's namespace. This will fix our local connection
* endpoint.
*/
* that "supports" app's namespace. This will fix our local connection
* endpoint.
*/
- fib_index = sep->is_ip4 ? app_ns->ip4_fib_index : app_ns->ip6_fib_index;
+
+ /* If in default namespace and user requested a fib index use it */
+ if (ns_index == 0 && sep->fib_index != ENDPOINT_INVALID_INDEX)
+ fib_index = sep->fib_index;
+ else
+ fib_index = sep->is_ip4 ? app_ns->ip4_fib_index : app_ns->ip6_fib_index;
sep->peer.fib_index = fib_index;
sep->fib_index = fib_index;
sep->peer.fib_index = fib_index;
sep->fib_index = fib_index;
@@
-553,6
+558,7
@@
vnet_application_attach (vnet_app_attach_args_t * a)
ASSERT (vec_len (fs->ssvm.name) <= 128);
a->segment = &fs->ssvm;
ASSERT (vec_len (fs->ssvm.name) <= 128);
a->segment = &fs->ssvm;
+ a->segment_handle = segment_manager_segment_handle (sm, fs);
segment_manager_segment_reader_unlock (sm);
vec_free (app_name);
segment_manager_segment_reader_unlock (sm);
vec_free (app_name);
@@
-663,7
+669,7
@@
vnet_disconnect_session (vnet_disconnect_args_t * a)
/* We're peeking into another's thread pool. Make sure */
ASSERT (s->session_index == session_index_from_handle (a->handle));
/* We're peeking into another's thread pool. Make sure */
ASSERT (s->session_index == session_index_from_handle (a->handle));
- s
tream_session_disconnect
(s);
+ s
ession_close
(s);
}
return 0;
}
}
return 0;
}