summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-12-08 17:21:37 +0100
committerJeremy Allison <jra@samba.org>2017-12-12 20:37:08 +0100
commit5f31c911d1149a74f942292c623e8b213c587758 (patch)
tree001762e1dfbb65ce800f7c06a151f75048b7fda3
parenta3a4d9ccc09181885ef0b01db5fc5d306c8c7bf4 (diff)
downloadsamba-5f31c911d1149a74f942292c623e8b213c587758.tar.gz
messaging: Ignore messages from ourselves
For non-clustered messaging this should have never gone through the socket, we should have caught it before in messaging_send_iov_from. It can come in on a socket from ctdb when broadcasting in clustered mode. There ctdb does the broadcasting. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/lib/messages.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 561616df6e4..464233fda2c 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -399,6 +399,11 @@ static void messaging_recv_cb(struct tevent_context *ev,
(unsigned)rec.msg_type, rec.buf.length, num_fds,
server_id_str_buf(rec.src, &idbuf));
+ if (server_id_same_process(&rec.src, &msg_ctx->id)) {
+ DBG_DEBUG("Ignoring self-send\n");
+ goto close_fail;
+ }
+
messaging_dispatch_rec(msg_ctx, ev, &rec);
return;