diff options
author | Florin Coras <fcoras@cisco.com> | 2017-08-14 11:25:25 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-08-15 12:33:31 +0000 |
commit | ab0289a85c45699878d203b4a0d2e5b38c36cc55 (patch) | |
tree | 320d8d5f267e4ec11670ded214c7f3f2a3670cd2 /src/vnet/session/session.c | |
parent | 8ddd518f9a65af77dc3294f1965452aa72cb0eb2 (diff) |
tcp: state machine improvements
- Add SYN_RCVD timeout
- Fix FIN_WAIT_1 to CLOSING transition
Change-Id: I42ca7fc087f6fdfae15bd7a6175dd3226ed341c7
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r-- | src/vnet/session/session.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 3a3e4dfe588..843d474fa19 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -373,7 +373,7 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail) application_t *app; stream_session_t *new_s = 0; u64 handle; - u32 api_context = 0; + u32 opaque = 0; int error = 0; handle = stream_session_half_open_lookup_handle (&tc->lcl_ip, &tc->rmt_ip, @@ -385,9 +385,11 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail) return -1; } - /* Get the app's index from the handle we stored when opening connection */ + /* Get the app's index from the handle we stored when opening connection + * and the opaque (api_context for external apps) from transport session + * index*/ app = application_get (handle >> 32); - api_context = tc->s_index; + opaque = tc->s_index; if (!is_fail) { @@ -406,7 +408,7 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail) } /* Notify client application */ - if (app->cb_fns.session_connected_callback (app->index, api_context, new_s, + if (app->cb_fns.session_connected_callback (app->index, opaque, new_s, is_fail)) { clib_warning ("failed to notify app"); |