From f44232e6a18a4b79e680ea0b6322269b84fa6813 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Mon, 29 Feb 2016 15:48:58 +0530 Subject: glusterd:upon re-peer probe glusterd should not return response to CLI two times If a node N1 and node N2 is part of the cluster and a node N2 try to reprobe node N1 when N1 is disconnected by any means (for eg: either server is down or glusterd is not running or there is a network outage, or firewall is blocking port number 24007 on which glusterd listen, etc.), then glusterd trying to send back two responses to CLI resulting into a double free and a glusterd crash. With this fix glusterd will send response to cli only once and prevent glusterd crash. Note: glusterd was crashing only when user has done first peer probe with hostname and re-probe with ip-address or vice-versa. Change-Id: I92012b147091cf9129f1fbc17834b3f4d7cb46a0 BUG: 1310677 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/13546 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-handler.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 3971bb56a91..c5d486d00dd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3695,6 +3695,7 @@ glusterd_probe_begin (rpcsvc_request_t *req, const char *hoststr, int port, } else { glusterd_xfer_cli_probe_resp (req, 0, GF_PROBE_FRIEND, NULL, (char*)hoststr, port, dict); + ret = 0; } out: -- cgit