diff options
author | Florin Coras <fcoras@cisco.com> | 2020-03-29 18:54:04 +0000 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2020-04-01 20:24:38 +0000 |
commit | 0a1e183e5aa45fb0050eb03e1c8ebdb9f426a374 (patch) | |
tree | dc3a7789b55bebff61d566d54e4801536691bd7a /src/vnet/session/application_interface.h | |
parent | 9076789779c5a038ec17936130a556703c234fa8 (diff) |
session udp: support connect on listeners
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6aaaec20a2b6d4c6ddfbe659d9402acc1be2f7e2
Diffstat (limited to 'src/vnet/session/application_interface.h')
-rw-r--r-- | src/vnet/session/application_interface.h | 4 |
1 files changed, 3 insertions, 1 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); |