diff options
author | Florin Coras <fcoras@cisco.com> | 2017-11-22 10:39:09 -0800 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-11-22 21:27:23 +0000 |
commit | eb2945cf6ffa35c3b22c2fa0c85bc67c9c39045a (patch) | |
tree | e99b573796d67c2373df1e1d9599f3839a84d737 /src/vnet/session/session_api.c | |
parent | 62b29a242ce1c6edf08a78e43e027c763b7cf730 (diff) |
session: do not check transport for local table binds
Change-Id: I326c4472e5da8b6c0737655952d1983c7a0ea996
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-x | src/vnet/session/session_api.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c index 3a382e5d454..e987854bc73 100755 --- a/src/vnet/session/session_api.c +++ b/src/vnet/session/session_api.c @@ -624,7 +624,7 @@ vl_api_bind_sock_t_handler (vl_api_bind_sock_t * mp) vnet_bind_args_t _a, *a = &_a; int rv = 0; clib_error_t *error; - application_t *app; + application_t *app = 0; stream_session_t *s; transport_connection_t *tc = 0; ip46_address_t *ip46; @@ -657,11 +657,6 @@ vl_api_bind_sock_t_handler (vl_api_bind_sock_t * mp) rv = clib_error_get_code (error); clib_error_report (error); } - else - { - s = listen_session_get_from_handle (a->handle); - tc = listen_session_get_transport (s); - } done: /* *INDENT-OFF* */ @@ -669,9 +664,14 @@ done: if (!rv) { rmp->handle = a->handle; - rmp->lcl_is_ip4 = tc->is_ip4; - clib_memcpy (rmp->lcl_ip, &tc->lcl_ip, sizeof (tc->lcl_ip)); - rmp->lcl_port = tc->lcl_port; + rmp->lcl_port = mp->port; + if (application_has_global_scope (app)) + { + s = listen_session_get_from_handle (a->handle); + tc = listen_session_get_transport (s); + rmp->lcl_is_ip4 = tc->is_ip4; + clib_memcpy (rmp->lcl_ip, &tc->lcl_ip, sizeof (tc->lcl_ip)); + } } })); /* *INDENT-ON* */ |