aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'extras/libmemif/src/socket.c')
-rw-r--r--extras/libmemif/src/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/libmemif/src/socket.c b/extras/libmemif/src/socket.c
index 8f18d892139..a471e0ba943 100644
--- a/extras/libmemif/src/socket.c
+++ b/extras/libmemif/src/socket.c
@@ -227,6 +227,7 @@ memif_msg_enq_add_ring (memif_connection_t * c, uint8_t index, uint8_t dir)
ar->region = mq->region;
ar->log2_ring_size = mq->log2_ring_size;
ar->flags = (dir == MEMIF_RING_S2M) ? MEMIF_MSG_ADD_RING_FLAG_S2M : 0;
+ ar->private_hdr_size = 0;
e->next = NULL;
if (c->msg_queue == NULL)
@@ -516,6 +517,9 @@ memif_msg_receive_add_ring (memif_connection_t * c, memif_msg_t * msg, int fd)
if (fd < 0)
return MEMIF_ERR_NO_INTFD;
+ if (ar->private_hdr_size != 0)
+ return MEMIF_ERR_PRIVHDR;
+
if (ar->flags & MEMIF_MSG_ADD_RING_FLAG_S2M)
{
if (ar->index > MEMIF_MAX_S2M_RING)