aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-03-15 07:45:27 -0700
committerDave Wallace <dwallacelf@gmail.com>2018-03-16 02:20:09 +0000
commite1b819efac7f8434f17d0482b631c2450e3dd5bb (patch)
tree7db51b4e0c7bb9c7dc02530faef45f0645d175a2 /src
parent55f99675e5d8aeeb398008cf3e73856c023ff587 (diff)
session: allow local host binds
Change-Id: I906bbc5bc75279f210093fb9276db9e35ee44c1f Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/session/application_interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/session/application_interface.c b/src/vnet/session/application_interface.c
index dbd5e49417f..f069b28a5cc 100644
--- a/src/vnet/session/application_interface.c
+++ b/src/vnet/session/application_interface.c
@@ -97,8 +97,8 @@ session_endpoint_is_zero (session_endpoint_t * sep)
u8
session_endpoint_in_ns (session_endpoint_t * sep)
{
- u8 is_zero = ip_is_zero (&sep->ip, sep->is_ip4);
- if (!is_zero && sep->sw_if_index != ENDPOINT_INVALID_INDEX
+ u8 is_lep = session_endpoint_is_local (sep);
+ if (!is_lep && sep->sw_if_index != ENDPOINT_INVALID_INDEX
&& !ip_interface_has_address (sep->sw_if_index, &sep->ip, sep->is_ip4))
{
clib_warning ("sw_if_index %u not configured with ip %U",
@@ -106,7 +106,7 @@ session_endpoint_in_ns (session_endpoint_t * sep)
sep->is_ip4);
return 0;
}
- return (is_zero || ip_is_local (sep->fib_index, &sep->ip, sep->is_ip4));
+ return (is_lep || ip_is_local (sep->fib_index, &sep->ip, sep->is_ip4));
}
int
@@ -176,7 +176,7 @@ vnet_bind_i (u32 app_index, session_endpoint_t * sep, u64 * handle)
* Add session endpoint to local session table. Only binds to "inaddr_any"
* (i.e., zero address) are added to local scope table.
*/
- if (application_has_local_scope (app) && session_endpoint_is_zero (sep))
+ if (application_has_local_scope (app) && session_endpoint_is_local (sep))
{
if ((rv = application_start_local_listen (app, sep, handle)))
return rv;