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