summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-01-23 09:21:30 -0800
committerDave Barach <openvpp@barachs.net>2019-01-24 21:23:42 +0000
commit5f45e01f5c3ce239eccd9546e2d04fa3141ca5cb (patch)
treee0dbd1254a4e7c325dca5f2738845a9b1aaedcc4 /src/vnet/session/session.h
parent8704097b9bd1e2ca717116fa1e7d61b4736c3fbd (diff)
session/vcl: support worker ownership change for listeners
Change-Id: I2ad54b20b96f10b009c3e651b2a2f885577ca5b6 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 2bbc380282c..babb002e07e 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -445,7 +445,12 @@ session_type_from_proto_and_ip (transport_proto_t proto, u8 is_ip4)
always_inline u64
session_segment_handle (stream_session_t * s)
{
- svm_fifo_t *f = s->server_rx_fifo;
+ svm_fifo_t *f;
+
+ if (s->session_state == SESSION_STATE_LISTENING)
+ return SESSION_INVALID_HANDLE;
+
+ f = s->server_rx_fifo;
return segment_manager_make_segment_handle (f->segment_manager,
f->segment_index);
}