From: Chris Leech <cle...@redhat.com>

This fixes the condition where hostno value of 0 was being treated
as invalid.

Signed-off-by: Chris Leech <cle...@redhat.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravan...@qlogic.com>
---
 usr/iscsiadm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 3cde8d1..36617ab 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -3470,7 +3470,7 @@ main(int argc, char **argv)
                                                       &params);
                                break;
                        case MODE_HOST_STATS:
-                               if (!host_no) {
+                               if (host_no > MAX_HOST_NO) {
                                        log_error("STATS mode requires host 
no");
                                        rc = ISCSI_ERR_INVAL;
                                        break;
-- 
1.7.1

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to