aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/survey0/xrespond.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/survey0/xrespond.c')
-rw-r--r--src/protocol/survey0/xrespond.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/protocol/survey0/xrespond.c b/src/protocol/survey0/xrespond.c
index bcbbcbc7..13a3d759 100644
--- a/src/protocol/survey0/xrespond.c
+++ b/src/protocol/survey0/xrespond.c
@@ -164,6 +164,10 @@ xresp0_pipe_start(void *arg)
xresp0_sock *s = p->psock;
int rv;
+ if (nni_pipe_peer(p->npipe) != NNI_PROTO_SURVEYOR_V0) {
+ return (NNG_EPROTO);
+ }
+
p->id = nni_pipe_id(p->npipe);
nni_mtx_lock(&s->mtx);