[Sheepdog] [PATCH] sheep: reject requests if the target node is not the sheepdog member

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 12 10:05:28 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/net.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sheep/net.c b/sheep/net.c
index 56532e8..f1ce8ea 100644
--- a/sheep/net.c
+++ b/sheep/net.c
@@ -160,6 +160,12 @@ static void queue_request(struct request *req)
 		return;
 	}
 
+	if (sys->status == SD_STATUS_JOIN_FAILED) {
+		rsp->result = SD_RES_JOIN_FAILED;
+		req->done(req);
+		return;
+	}
+
 	if (sys->status == SD_STATUS_WAIT_FOR_FORMAT ||
 	    sys->status == SD_STATUS_WAIT_FOR_JOIN) {
 		/* TODO: cleanup */
-- 
1.5.6.5




More information about the sheepdog mailing list