[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7

Mike Christie michaelc at cs.wisc.edu
Sat Apr 7 15:44:17 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit ac4dba5ea191c9bcccd6e2831eeb474094cffa14
Author: Mike Christie <michaelc at cs.wisc.edu>
Date:   Wed Mar 21 20:56:34 2012 -0400

    iscsiadm: load iface before checking for hostno/mac match
    
    If the driver is not loaded then we will not match a mac
    to a hostno.

diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
index 32de5f5..4303135 100644
--- a/usr/iscsiadm.c
+++ b/usr/iscsiadm.c
@@ -1116,6 +1116,17 @@ do_sendtargets(discovery_rec_t *drec, struct list_head *ifaces,
 			free(iface);
 			continue;
 		}
+		/* check for transport name first to make sure it is loaded */
+		t = iscsi_sysfs_get_transport_by_name(iface->transport_name);
+		if (!t) {
+			log_error("Could not load transport %s."
+				  "Dropping interface %s.",
+				   iface->transport_name, iface->name);
+			list_del(&iface->list);
+			free(iface);
+			continue;
+		}
+
 		host_no = iscsi_sysfs_get_host_no_from_hwinfo(iface, &rc);
 		if (rc || host_no == -1) {
 			log_debug(1, "Could not match iface" iface_fmt " to "
@@ -1124,18 +1135,6 @@ do_sendtargets(discovery_rec_t *drec, struct list_head *ifaces,
 			continue;
 		}
 
-		t = iscsi_sysfs_get_transport_by_hba(host_no);
-		if (!t) {
-			log_error("Could not match hostno %d to "
-				  "transport. Dropping interface %s,"
-				   iface_fmt " ,%s.",
-				   host_no, iface->transport_name,
-				   iface_str(iface), iface->ipaddress);
-			list_del(&iface->list);
-			free(iface);
-			continue;
-		}
-
 		if (t->caps & CAP_SENDTARGETS_OFFLOAD) {
 			do_offload_sendtargets(drec, host_no, do_login);
 			list_del(&iface->list);

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list