[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:43:39 UTC 2012


The following commit has been merged in the upstream-mnc branch:
commit 4c93bba5ea9610fce9999ff7dc21f28b90e947d8
Author: Jim Ramsay <jim_ramsay at dell.com>
Date:   Wed Jul 20 09:06:45 2011 -0400

    Revise bind_conn_to_iface logic
    
    This now explicitly enforces the logic already hinted at, which should prefer
    hardware address over net_ifacename in all circumstances. Previously the 'else
    if' was always being executed.
    
    Signed-off-by: Jim Ramsay <jim_ramsay at dell.com>

diff --git a/usr/io.c b/usr/io.c
index fef6785..8d37d43 100644
--- a/usr/io.c
+++ b/usr/io.c
@@ -303,14 +303,16 @@ static int bind_conn_to_iface(iscsi_conn_t *conn, struct iface_rec *iface)
 		return 0;
 
 	memset(session->netdev, 0, IFNAMSIZ);
-	if (iface_is_bound_by_hwaddr(iface) &&
-	    net_get_netdev_from_hwaddress(iface->hwaddress, session->netdev)) {
-		log_error("Cannot match %s to net/scsi interface.",
-			  iface->hwaddress);
-                return -1;
-	} else if (iface_is_bound_by_netdev(iface))
+	if (iface_is_bound_by_hwaddr(iface)) {
+		if (net_get_netdev_from_hwaddress(iface->hwaddress,
+						  session->netdev)) {
+			log_error("Cannot match %s to net/scsi interface.",
+				  iface->hwaddress);
+			return -1;
+		}
+	} else if (iface_is_bound_by_netdev(iface)) {
 		strcpy(session->netdev, iface->netdev);
-	else if (iface_is_bound_by_ipaddr(iface)) {
+	} else if (iface_is_bound_by_ipaddr(iface)) {
 		/*
 		 * we never supported this but now with offload having to
 		 * set the ip address in the iface, useris may forget to

-- 
Debian Open-iSCSI Packaging



More information about the Pkg-iscsi-maintainers mailing list