Blame 0071-iscsiadm-Fix-the-hostno-check-for-stats-submode-of-h.patch

3f3ec35
From f2ecc22d3cb0473b117a33e048a5a56cd8e9e46d Mon Sep 17 00:00:00 2001
3f3ec35
From: Chris Leech <cleech@redhat.com>
3f3ec35
Date: Mon, 24 Feb 2014 03:14:17 -0500
3f3ec35
Subject: [PATCH] iscsiadm: Fix the hostno check for stats submode of host mode
3f3ec35
3f3ec35
This fixes the condition where hostno value of 0 was being treated
3f3ec35
as invalid.
3f3ec35
3f3ec35
Signed-off-by: Chris Leech <cleech@redhat.com>
3f3ec35
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
3f3ec35
---
3f3ec35
 usr/iscsiadm.c | 2 +-
3f3ec35
 1 file changed, 1 insertion(+), 1 deletion(-)
3f3ec35
3f3ec35
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
3f3ec35
index 3cde8d1..36617ab 100644
3f3ec35
--- a/usr/iscsiadm.c
3f3ec35
+++ b/usr/iscsiadm.c
3f3ec35
@@ -3470,7 +3470,7 @@ main(int argc, char **argv)
3f3ec35
 						       &params);
3f3ec35
 				break;
3f3ec35
 			case MODE_HOST_STATS:
3f3ec35
-				if (!host_no) {
3f3ec35
+				if (host_no > MAX_HOST_NO) {
3f3ec35
 					log_error("STATS mode requires host no");
3f3ec35
 					rc = ISCSI_ERR_INVAL;
3f3ec35
 					break;
3f3ec35
-- 
3f3ec35
1.9.3
3f3ec35