6881948 panic in isnst_add_default_portals when isns enabled but no IP addresses are UP.
authorPeter Cudhea - Sun Microsystems - Burlington, MA United States <Peter.Cudhea@Sun.COM>
Tue, 22 Sep 2009 10:23:49 -0400
changeset 10606 438ded3d6917
parent 10605 4086dd59e147
child 10607 da3cc66100c3
6881948 panic in isnst_add_default_portals when isns enabled but no IP addresses are UP.
usr/src/uts/common/io/comstar/port/iscsit/iscsit_isns.c
--- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit_isns.c	Tue Sep 22 17:57:33 2009 +0800
+++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit_isns.c	Tue Sep 22 10:23:49 2009 -0400
@@ -3282,16 +3282,16 @@
 	 * c) the default portal has gone offline
 	 */
 	if (isns_portals_changed ||
-	    (default_portal_online &&
+	    ((new_portal_list_size != 0) &&
 	    (isnst_find_default_portals(new_portal_list) !=
 	    num_default_portals)) ||
-	    (! default_portal_online && num_default_portals > 0)) {
+	    ((new_portal_list_size == 0) && (num_default_portals > 0))) {
 
 		isnst_clear_default_portals();
 		isnst_copy_portal_list(&isns_tpg_portals,
 		    &isns_all_portals);
 		num_tpg_portals = avl_numnodes(&isns_all_portals);
-		if (default_portal_online) {
+		if (new_portal_list_size != 0) {
 			num_default_portals =
 			    isnst_add_default_portals(new_portal_list);
 		}