aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/application_interface.h4
-rw-r--r--src/vnet/session/session_node.c1
-rw-r--r--src/vnet/session/session_types.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index bf946769028..b1ab847073a 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -387,6 +387,7 @@ typedef struct session_connect_msg_
u32 wrk_index;
u32 vrf;
u16 port;
+ u16 lcl_port;
u8 proto;
u8 is_ip4;
ip46_address_t ip;
@@ -681,7 +682,7 @@ app_recv_dgram_raw (svm_fifo_t * f, u8 * buf, u32 len,
int rv;
max_deq = svm_fifo_max_dequeue_cons (f);
- if (max_deq < sizeof (session_dgram_hdr_t))
+ if (max_deq <= sizeof (session_dgram_hdr_t))
{
if (clear_evt)
svm_fifo_unset_event (f);
@@ -699,6 +700,7 @@ app_recv_dgram_raw (svm_fifo_t * f, u8 * buf, u32 len,
rv = svm_fifo_peek (f, ph.data_offset + SESSION_CONN_HDR_LEN, len, buf);
if (peek)
return rv;
+ ASSERT (rv > 0);
ph.data_offset += rv;
if (ph.data_offset == ph.data_length)
svm_fifo_dequeue_drop (f, ph.data_length + SESSION_CONN_HDR_LEN);
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 2a4bb6b9425..66300bc6024 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -113,6 +113,7 @@ session_mq_connect_handler (void *data)
a->sep.transport_proto = mp->proto;
a->sep.peer.fib_index = mp->vrf;
clib_memcpy_fast (&a->sep.peer.ip, &mp->lcl_ip, sizeof (mp->lcl_ip));
+ a->sep.peer.port = mp->lcl_port;
a->sep.peer.sw_if_index = ENDPOINT_INVALID_INDEX;
a->sep_ext.parent_handle = mp->parent_handle;
a->sep_ext.ckpair_index = mp->ckpair_index;
diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h
index aa0e8650747..a0360136b1d 100644
--- a/src/vnet/session/session_types.h
+++ b/src/vnet/session/session_types.h
@@ -21,7 +21,7 @@
#define SESSION_INVALID_INDEX ((u32)~0)
#define SESSION_INVALID_HANDLE ((u64)~0)
-#define SESSION_CTRL_MSG_MAX_SIZE 84
+#define SESSION_CTRL_MSG_MAX_SIZE 86
#define foreach_session_endpoint_fields \
foreach_transport_endpoint_cfg_fields \