Blob Blame Raw
diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 2d9f1a2..87dd4a0 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -1646,7 +1646,7 @@ main(int argc, char **argv)
 		goto free_ifaces;
 	}
 
-	if (mode != MODE_DISCOVERY && ip)
+	if (mode != MODE_DISCOVERY && ip && port == -1)
 		port = ISCSI_LISTEN_PORT;
 
 	switch (mode) {