From: Robert W. <wrw...@us...> - 2007-05-31 21:16:41
|
Update of /cvsroot/linuxisns/isnsNT/isnsserver/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32564/src Modified Files: iSNSUtil.c iSNSdb.c iSNSparse.c iSNSquery.c iSNSreg.c Log Message: Add Better Support for Portal Groups Index: iSNSparse.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSparse.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** iSNSparse.c 4 Jan 2007 19:00:07 -0000 1.18 --- iSNSparse.c 31 May 2007 21:16:36 -0000 1.19 *************** *** 190,193 **** --- 190,194 ---- case ISNS_IFCP_SCN_BITMAP: case ISNS_DD_FEATURE_BITMAP: + case ISNS_PORTAL_GROUP: case ISNS_PORTAL_GROUP_TAG: case ISNS_PORTAL_SECURITY_BITMAP: *************** *** 445,448 **** --- 446,450 ---- case ISNS_PORTAL_GROUP_PORT: case ISNS_PORTAL_GROUP_TAG: + case ISNS_PORTAL_GROUP: if (pattr->len != 0) { Index: iSNSreg.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSreg.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** iSNSreg.c 30 Mar 2007 22:56:14 -0000 1.25 --- iSNSreg.c 31 May 2007 21:16:36 -0000 1.26 *************** *** 685,689 **** ISNS_Key *key = NULL; ISNS_Attr *attr = NULL; ! SOIP_Portal_Group *p_portal_group; SOIP_Portal_Group_Key db_portal_group; int ii; --- 685,689 ---- ISNS_Key *key = NULL; ISNS_Attr *attr = NULL; ! SOIP_Portal_Group *p_portal_group = NULL; SOIP_Portal_Group_Key db_portal_group; int ii; *************** *** 694,709 **** int saveIndex; int stopFlag = FALSE; ! int newPortalRegFlag; ! int updateFlag; ! //char *p_iscsi_name; ! ISNS_DBKey read_key; DEBUG_0 (isns_reg_debug & 1, (Registering Portal Group)); ! newPortalRegFlag = FALSE; portalPortIndex = -1; portalIpIndex = -1; iscsiIndex = -1; for (ii = 0; ii < SNS_MAX_ATTRS && key_indx[ ii ] && (portalIpIndex == -1 || portalPortIndex == -1 || iscsiIndex == -1); ii++) --- 694,710 ---- int saveIndex; int stopFlag = FALSE; ! int portal_tag = 1; ! int newPortalGroupRegFlag; ! ISNS_DBKey read_key; DEBUG_0 (isns_reg_debug & 1, (Registering Portal Group)); ! newPortalGroupRegFlag = FALSE; portalPortIndex = -1; portalIpIndex = -1; iscsiIndex = -1; + memset(&db_portal_group,0,sizeof(SOIP_Portal_Group_Key)); + for (ii = 0; ii < SNS_MAX_ATTRS && key_indx[ ii ] && (portalIpIndex == -1 || portalPortIndex == -1 || iscsiIndex == -1); ii++) *************** *** 747,756 **** { /* No keys */ ! newPortalRegFlag = TRUE; } else if (portalIpIndex == -1 || portalPortIndex == -1) { /* One or the other key */ ! DEBUG_0 (isns_reg_debug & 1, (Portal Reg: Missing keys)); return ( ISNS_INVALID_REG_ERR ); } --- 748,757 ---- { /* No keys */ ! newPortalGroupRegFlag = TRUE; } else if (portalIpIndex == -1 || portalPortIndex == -1) { /* One or the other key */ ! DEBUG_0 (isns_reg_debug & 1, (Portal Reg: Missing keys in Key Attributes)); return ( ISNS_INVALID_REG_ERR ); } *************** *** 760,764 **** while ( saveIndex < SNS_MAX_ATTRS ) { ! if ( newPortalRegFlag ) { /* Search for the tag portal IP and portal PORT. */ --- 761,765 ---- while ( saveIndex < SNS_MAX_ATTRS ) { ! if ( newPortalGroupRegFlag ) { /* Search for the tag portal IP and portal PORT. */ *************** *** 767,772 **** portalPortIndex = -1; ! for ( ii = saveIndex; ii < SNS_MAX_ATTRS && attr_indx[ii] ! && (portalIpIndex == -1 || portalPortIndex == -1 || iscsiIndex == -1); ii++ ) { attr = (ISNS_Attr *) attr_indx[ ii ]; --- 768,773 ---- portalPortIndex = -1; ! stopFlag=FALSE; ! for (ii=saveIndex; (ii<SNS_MAX_ATTRS) && attr_indx[ii] && !stopFlag; ii++) { attr = (ISNS_Attr *) attr_indx[ ii ]; *************** *** 776,802 **** /* Check to see if we already had an IP */ if (portalIpIndex != -1) ! { ! DEBUG_0 (isns_reg_debug & 1, (PORTAL_IP tag found twice)); ! return ( ISNS_INVALID_REG_ERR ); ! } ! portalIpIndex = ii; break; case ISNS_PORTAL_PORT: /* Check to see if we already had a PORT */ if (portalPortIndex != -1) ! { ! DEBUG_0 (isns_reg_debug & 1, (PORTAL_PORT tag found twice)); ! return ( ISNS_INVALID_REG_ERR ); ! } ! portalPortIndex = ii; break; case ISNS_ISCSI_NODE_ID: - /* Check to see if we already had an iscsi name */ if (iscsiIndex != -1) ! { ! DEBUG_0 (isns_reg_debug & 1, (ISCSI Node tag found twice)); ! return ( ISNS_INVALID_REG_ERR ); ! } ! iscsiIndex = ii; break; default: --- 777,801 ---- /* Check to see if we already had an IP */ if (portalIpIndex != -1) ! stopFlag=TRUE; ! else ! portalIpIndex = ii; break; case ISNS_PORTAL_PORT: /* Check to see if we already had a PORT */ if (portalPortIndex != -1) ! stopFlag=TRUE; ! else ! portalPortIndex = ii; break; case ISNS_ISCSI_NODE_ID: if (iscsiIndex != -1) ! stopFlag=TRUE; ! else ! iscsiIndex = ii; ! break; ! case ISNS_PORTAL_GROUP: ! case ISNS_PORTAL_GROUP_TAG: ! portal_tag = attr->val.portal_group; ! DEBUG_1 (isns_reg_debug &1,(Portal Group tag:%i),portal_tag); break; default: *************** *** 808,812 **** if ( portalIpIndex == -1 || portalPortIndex == -1 || iscsiIndex == -1) { ! DEBUG_0 (isns_reg_debug & 1, (PORTAL REG, MISSING KEYS)); return ( ISNS_INVALID_REG_ERR ); } --- 807,811 ---- if ( portalIpIndex == -1 || portalPortIndex == -1 || iscsiIndex == -1) { ! DEBUG_0 (isns_reg_debug & 1, (Portal Group Registration, MISSING KEYS)); return ( ISNS_INVALID_REG_ERR ); } *************** *** 814,825 **** attr = (ISNS_Attr *) attr_indx[ portalPortIndex ]; db_portal_group.ip_port = attr->val.ip_port; ! DEBUG_1 (isns_reg_debug &1,(Portal ip_port:%i),attr->val.ip_port); attr = (ISNS_Attr *) attr_indx[ portalIpIndex ]; memcpy ( (char *) db_portal_group.ip_addr.v, &attr->val, ISNS_PORTAL_IP_SIZE ); attr = (ISNS_Attr *) attr_indx[ iscsiIndex ]; ! memcpy ( (char *) db_portal_group.id.v, &attr->val, MAX_ISCSI_NODE_ID_SIZE); saveIndex = ii; --- 813,826 ---- attr = (ISNS_Attr *) attr_indx[ portalPortIndex ]; db_portal_group.ip_port = attr->val.ip_port; ! DEBUG_1 (isns_reg_debug &1,(Portal Group ip_port:%i),attr->val.ip_port); attr = (ISNS_Attr *) attr_indx[ portalIpIndex ]; memcpy ( (char *) db_portal_group.ip_addr.v, &attr->val, ISNS_PORTAL_IP_SIZE ); + DEBUG_1 (isns_reg_debug &1,(Portal Group ip_addr:%s),db_portal_group.ip_addr.v); attr = (ISNS_Attr *) attr_indx[ iscsiIndex ]; ! memcpy ( (char *) db_portal_group.id.v, &attr->val, attr->len); ! DEBUG_1 (isns_reg_debug &1,(Portal Group iscsi_name:%s),db_portal_group.id.v); saveIndex = ii; *************** *** 830,851 **** key = (ISNS_Key *) key_indx[ portalPortIndex ]; db_portal_group.ip_port = key->val.ip_port; ! DEBUG_1 (isns_reg_debug &1,(Portal ip_port:%i),key->val.ip_port); key = (ISNS_Key *) key_indx[ portalIpIndex ]; ! memcpy ( (char *) db_portal_group.ip_addr.v, &key->val, ! key->len ); DEBUG_1 (isns_reg_debug &1,(Portal ip_addr len:%i),key->len); attr = (ISNS_Attr *) key_indx[ iscsiIndex ]; ! memcpy ( (char *) db_portal_group.id.v, &attr->val,MAX_ISCSI_NODE_ID_SIZE); saveIndex = 0; } ! DEBUG_1 (isns_reg_debug &1,(read portal:%s),db_portal_group.ip_addr.v); read_key.tag = PORTAL_GROUP_ID_KEY; memcpy(&read_key.val,&db_portal_group,sizeof(SOIP_Portal_Group_Key)); rval = ISNSdbRead(&read_key,&entry2); p_portal_group = &entry2.data.portal_group; --- 831,874 ---- key = (ISNS_Key *) key_indx[ portalPortIndex ]; db_portal_group.ip_port = key->val.ip_port; ! DEBUG_1 (isns_reg_debug &1,(Portal Group ip_port:%i),key->val.ip_port); key = (ISNS_Key *) key_indx[ portalIpIndex ]; ! memcpy ( (char *) db_portal_group.ip_addr.v, &key->val, key->len); DEBUG_1 (isns_reg_debug &1,(Portal ip_addr len:%i),key->len); attr = (ISNS_Attr *) key_indx[ iscsiIndex ]; ! memcpy ( (char *) db_portal_group.id.v, &attr->val, attr->len); ! DEBUG_1 (isns_reg_debug &1,(Portal Group iscsi_name:%s),db_portal_group.id.v); saveIndex = 0; + + /* Find portal_tag value */ + stopFlag = FALSE; + for ( ii = 0; (ii < SNS_MAX_ATTRS) && attr_indx[ii] && !stopFlag; ii++ ) + { + attr = (ISNS_Attr *) attr_indx[ ii ]; + switch ( attr->tag ) + { + case ISNS_PORTAL_GROUP: + case ISNS_PORTAL_GROUP_TAG: + portal_tag = attr->val.portal_group; + DEBUG_1 (isns_reg_debug &1,Portal Group tag:%i,p_portal_group->portal_tag); + stopFlag = TRUE; + break; + default: + break; + } + + if (stopFlag) + break; + } } ! DEBUG_1 (isns_reg_debug &1,(read portal:%s),db_portal_group.id.v); read_key.tag = PORTAL_GROUP_ID_KEY; memcpy(&read_key.val,&db_portal_group,sizeof(SOIP_Portal_Group_Key)); rval = ISNSdbRead(&read_key,&entry2); + DEBUG_1 (isns_reg_debug & 1, Read PortalGroup for DB status:%i,rval); p_portal_group = &entry2.data.portal_group; *************** *** 861,873 **** if ( rval != SUCCESS ) { ! DEBUG_0 (isns_reg_debug &1,create new portal entry); ! ! if ( FALSE == newPortalRegFlag ) ! { ! DEBUG_0 (isns_reg_debug & 1, (Unable to retrieve portal entry)); ! return ( ISNS_INVALID_REG_ERR ); ! } - /* create a new node element */ memset (&entry2, 0, sizeof (SOIP_DB_Entry)); entry2.data_type = PORTAL_GROUP_ID_KEY; --- 884,889 ---- if ( rval != SUCCESS ) { ! DEBUG_0 (isns_reg_debug &1,create new portal group entry); memset (&entry2, 0, sizeof (SOIP_DB_Entry)); entry2.data_type = PORTAL_GROUP_ID_KEY; *************** *** 882,929 **** memcpy (p_portal_group->id.v, attr->val.node_name.v, attr->len); ! newPortalRegFlag = TRUE; } - else - - stopFlag = FALSE; - updateFlag = FALSE; - memset(p_scn_all_msg_buffer, 0, sizeof(ISNS_Msg)); - for ( ii = saveIndex; (ii < SNS_MAX_ATTRS) && (attr_indx[ ii ]); ii++ ) - { - attr = (ISNS_Attr *) attr_indx[ ii ]; - switch ( attr->tag ) - { - case ISNS_PORTAL_IP: - case ISNS_PORTAL_PORT: - saveIndex = ii; - stopFlag = TRUE; - break; - case ISNS_ISCSI_NODE_ID: - { - ISNSAppendKey( p_scn_all_msg_buffer, ISNS_ISCSI_NODE_ID, - PAD4(strlen(p_portal_group->id.v)), p_portal_group->id.v,0); - - updateFlag = TRUE; - } - break; - default: - break; - } ! if (stopFlag) ! break; ! } ! /* Store the portal */ ! DEBUG_1 (isns_reg_debug &1,Store Portal Group:%s,db_portal_group.ip_addr.v); ISNS_DBKey update_key; update_key.tag = PORTAL_GROUP_ID_KEY; memcpy(&update_key.val,&db_portal_group,sizeof(SOIP_Portal_Group_Key)); rval = ISNSdbWrite(&update_key,entry2); ! if ( newPortalRegFlag ) iSNS_stats.num_portal_groups++; - /* insert the key(s) */ if (p_rspmsg != NULL) { --- 898,919 ---- memcpy (p_portal_group->id.v, attr->val.node_name.v, attr->len); ! newPortalGroupRegFlag = TRUE; } ! p_portal_group->portal_tag = portal_tag; ! DEBUG_1 (isns_reg_debug &1,Store Portal Group:%s,db_portal_group.id.v); ISNS_DBKey update_key; update_key.tag = PORTAL_GROUP_ID_KEY; memcpy(&update_key.val,&db_portal_group,sizeof(SOIP_Portal_Group_Key)); rval = ISNSdbWrite(&update_key,entry2); + DEBUG_1 (isns_reg_debug & 1, Write PortalGroup for DB status:%i,rval); ! rval = ISNSdbRead(&read_key,&entry2); ! DEBUG_1 (isns_reg_debug & 1, Read PortalGroup for DB status:%i,rval); ! ! if ( newPortalGroupRegFlag ) iSNS_stats.num_portal_groups++; if (p_rspmsg != NULL) { *************** *** 941,945 **** attr = (ISNS_Attr *)(attr_indx[saveIndex]); ! if (!newPortalRegFlag) break; --- 931,935 ---- attr = (ISNS_Attr *)(attr_indx[saveIndex]); ! if (!newPortalGroupRegFlag) break; *************** *** 947,951 **** break; ! newPortalRegFlag = TRUE; if ((attr->tag == ISNS_PORTAL_IP) || (attr->tag == ISNS_PORTAL_PORT)) continue; --- 937,941 ---- break; ! newPortalGroupRegFlag = FALSE; if ((attr->tag == ISNS_PORTAL_IP) || (attr->tag == ISNS_PORTAL_PORT)) continue; Index: iSNSdb.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSdb.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** iSNSdb.c 29 Dec 2006 20:40:17 -0000 1.26 --- iSNSdb.c 31 May 2007 21:16:36 -0000 1.27 *************** *** 228,233 **** SOIP_Portal_Group_Key db_portal; memcpy(&db_portal,&key->val,sizeof(SOIP_Portal_Group_Key)); ! DEBUG_2 (isns_db_debug &1,read Portal Group ip_addr:%s port:%i, ! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)),db_portal.ip_port); k.dptr = (char *)&key->val; --- 228,235 ---- SOIP_Portal_Group_Key db_portal; memcpy(&db_portal,&key->val,sizeof(SOIP_Portal_Group_Key)); ! DEBUG_3 (isns_db_debug &1,read Portal Group name:%s ip_addr:%s port:%i, ! db_portal.id.v, ! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)), ! db_portal.ip_port); k.dptr = (char *)&key->val; *************** *** 236,241 **** if (d.dptr == NULL) { ! DEBUG_2 (isns_db_debug &1,read Portal Group ip_addr:%s port:%i, ! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)),db_portal.ip_port); return (ISNS_NO_SUCH_ENTRY_ERR); } --- 238,245 ---- if (d.dptr == NULL) { ! DEBUG_3 (isns_db_debug &1,read Portal Group name:%s ip_addr:%s port:%i, ! db_portal.id.v, ! inet_ntoa(*(struct in_addr *)(db_portal.ip_addr.v+12)), ! db_portal.ip_port); return (ISNS_NO_SUCH_ENTRY_ERR); } *************** *** 396,399 **** --- 400,404 ---- break; case PORTAL_GROUP_ID_KEY: + DEBUG_0 (isns_db_debug &1,PORTAL Group Write); k.dptr = (char *)&key->val; k.dsize = sizeof(SOIP_Portal_Group_Key); *************** *** 531,534 **** --- 536,540 ---- break; case PORTAL_GROUP_ID_KEY: + DEBUG_0 (isns_db_debug &1,PORTAL Group Delete); k.dptr = (char *)&key->val; k.dsize = sizeof(SOIP_Portal_Group_Key); Index: iSNSquery.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSquery.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** iSNSquery.c 30 Mar 2007 22:56:14 -0000 1.21 --- iSNSquery.c 31 May 2007 21:16:36 -0000 1.22 *************** *** 2718,2721 **** --- 2718,2723 ---- SOIP_Entity *p_entity; SOIP_Portal *p_portal; + SOIP_Portal_Group *p_portal_group = NULL; + SOIP_Portal_Group_Key key_portal_group; int rval; *************** *** 2862,2870 **** { DEBUG_0 (isns_query_debug &1, (fetchPortalFlag)); ! /* Cycle through all portal */ pnode = NULL; while ( (pnode = GetNextNode(&p_entity->iportal_list, pnode)) ) { ! DEBUG_0 (isns_query_debug &1, get portal); ISNS_DBKey read_key; read_key.tag = PORTAL_ID_KEY; --- 2864,2872 ---- { DEBUG_0 (isns_query_debug &1, (fetchPortalFlag)); ! /* Cycle through all portals */ pnode = NULL; while ( (pnode = GetNextNode(&p_entity->iportal_list, pnode)) ) { ! DEBUG_0 (isns_query_debug &1, Get portal record ); ISNS_DBKey read_key; read_key.tag = PORTAL_ID_KEY; *************** *** 2872,2879 **** --- 2874,2902 ---- rval = ISNSdbRead(&read_key,&entry5); if (rval != SUCCESS ) + { + DEBUG_0 (isns_query_debug &1, portal record not found ); return rval; + } p_portal = &entry5.data.portal; + DEBUG_0 (isns_query_debug &1, Get portal group record ); + memset(&key_portal_group, 0, sizeof(SOIP_Portal_Group_Key)); + key_portal_group.ip_port = p_portal->ip_port; + memcpy(key_portal_group.ip_addr.v,p_portal->ip_addr.v,ISNS_PORTAL_IP_SIZE); + memcpy(key_portal_group.id.v,p_node->id.v,strlen(p_node->id.v)); + + ISNS_DBKey read_group_key; + read_group_key.tag = PORTAL_GROUP_ID_KEY; + memcpy(&read_group_key.val,&key_portal_group,sizeof(SOIP_Portal_Group_Key)); + rval = ISNSdbRead(&read_group_key,&entry4); + if (rval != SUCCESS ) + { + DEBUG_0 (isns_query_debug &1, portal group record not found ); + return rval; + } + + p_portal_group = &entry4.data.portal_group; + for (jj = 0; (jj < SNS_MAX_ATTRS) && (attr_indx[jj]); jj++) { *************** *** 2920,2929 **** DEBUG_1 (isns_query_debug &1,ISNS_PORTAL_GROUP_PORT:%i,p_portal->ip_port); ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_PORT, ISNS_PORTAL_GROUP_PORT_SIZE, ! NULL, p_portal->ip_port); break; case ISNS_PORTAL_GROUP_IP: DEBUG_0 (isns_query_debug &1,Add ISNS_PORTAL_GROUP_IP); ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_IP, ISNS_PORTAL_GROUP_IP_SIZE, ! p_portal->ip_addr.v, 0); break; case ISNS_PORTAL_GROUP_ISCSI_NAME: --- 2943,2952 ---- DEBUG_1 (isns_query_debug &1,ISNS_PORTAL_GROUP_PORT:%i,p_portal->ip_port); ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_PORT, ISNS_PORTAL_GROUP_PORT_SIZE, ! NULL, p_portal_group->ip_port); break; case ISNS_PORTAL_GROUP_IP: DEBUG_0 (isns_query_debug &1,Add ISNS_PORTAL_GROUP_IP); ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_IP, ISNS_PORTAL_GROUP_IP_SIZE, ! p_portal_group->ip_addr.v, 0); break; case ISNS_PORTAL_GROUP_ISCSI_NAME: *************** *** 2934,2938 **** case ISNS_PORTAL_GROUP_TAG: ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_TAG, ISNS_PORTAL_GROUP_TAG_SIZE, ! NULL, 1); // hard code group 1 for now break; default: --- 2957,2961 ---- case ISNS_PORTAL_GROUP_TAG: ISNSAppendAttr (p_msg, ISNS_PORTAL_GROUP_TAG, ISNS_PORTAL_GROUP_TAG_SIZE, ! NULL, p_portal_group->portal_tag); break; default: *************** *** 3579,3584 **** if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1, "***ERROR*** Invalid DD"); ! return (ISNS_AUTH_FAILED_ERR); } } --- 3602,3607 ---- if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1,"src attribute not found in a Discovery Domain"); ! return (ISNS_AUTH_FAILED_ERR); } } *************** *** 3598,3602 **** if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1, "***ERROR*** Invalid DD"); return (ISNS_AUTH_FAILED_ERR); } --- 3621,3625 ---- if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1,"src attribute not found in a Discovery Domain"); return (ISNS_AUTH_FAILED_ERR); } *************** *** 3614,3619 **** if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1, "***ERROR: Invalid DD"); ! return (ISNS_AUTH_FAILED_ERR); } } --- 3637,3642 ---- if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1,"src attribute not found in a Discovery Domain"); ! return (ISNS_AUTH_FAILED_ERR); } } *************** *** 3632,3637 **** if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1, "***ERROR*** Invalid DD"); ! return (ISNS_AUTH_FAILED_ERR); } } --- 3655,3660 ---- if (FALSE == Check_Overlap_DD (dlist_src, dlist_node)) { ! DEBUG_0(isns_query_debug & 1,"src attribute not found in a Discovery Domain"); ! return (ISNS_AUTH_FAILED_ERR); } } Index: iSNSUtil.c =================================================================== RCS file: /cvsroot/linuxisns/isnsNT/isnsserver/src/iSNSUtil.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** iSNSUtil.c 4 Jan 2007 19:00:06 -0000 1.14 --- iSNSUtil.c 31 May 2007 21:16:36 -0000 1.15 *************** *** 758,764 **** if (level == LO_DETAIL) { ! printf( " %s %#08x, %#08x, %u\n", inet_ntoa(*(struct in_addr *)(p_portal->ip_addr.v+12)), ! p_portal->ip_port, p_portal->group, p_portal->portal_index); } else --- 758,764 ---- if (level == LO_DETAIL) { ! printf( " %s %#08x,%u\n", inet_ntoa(*(struct in_addr *)(p_portal->ip_addr.v+12)), ! p_portal->ip_port, p_portal->portal_index); } else *************** *** 772,776 **** pnode = NULL; printf("ENTITY : %s\n", p_portal->entity_id.id); - printf("GROUP : %#x\n", p_portal->group); printf("ESI INTERVAL : %u\n", p_portal->esi_interval); printf("ESI/SCN UDP PORT: %u\n", p_portal->esi_port); --- 772,775 ---- *************** *** 900,920 **** case ISNS_DDS_STATUS : return("Discovery Domain Set Status"); case ISNS_DD_ID : return("Discovery Domain ID"); ! case ISNS_DD_FEATURE_BITMAP : return("Discovery Domain Feature Bitmap"); case ISNS_DD_SYM_NAME : return("Discovery Domain Symbolic Name"); case ISNS_DD_ISCSI_MEMBER : return("Discovery Domain iSCSI Member"); case ISNS_DD_IFCP_MEMBER : return("Discovery Domain iFCP Member"); case ISNS_COMPANY_OUI : return("Company OUI"); ! case ISNS_ENTITY_IDX : return("Entity Index"); ! case ISNS_ISCSI_IDX : return("iSCSI Index"); ! case ISNS_PORTAL_IDX : return("Portal Index"); ! case ISNS_DD_ISCSI_MEMBER_IDX: return("Discovery Domain iSCSI Member Index"); ! case ISNS_DD_ACTIVE : return("Discovery Domain Active"); ! case ISNS_NODE_ACTIVE : return("Node Active"); ! case ISNS_SCN_PORT : return("SCN Port"); ! case ISNS_PORTAL_GROUP_TAG : return("Portal Group Tag"); ! case ISNS_PORTAL_GROUP_ISCSI_NAME : return("Portal Group ISCSI Name"); ! case ISNS_PORTAL_GROUP_IP : return("Portal Group IP Address"); ! case ISNS_PORTAL_GROUP_PORT : return("Portal Group TCP/UDP Port"); ! case ISNS_PORTAL_SECURITY_BITMAP: return("Portal Security Bitmap"); default : return("Unknown TAG code"); } --- 899,920 ---- case ISNS_DDS_STATUS : return("Discovery Domain Set Status"); case ISNS_DD_ID : return("Discovery Domain ID"); ! case ISNS_DD_FEATURE_BITMAP : return("Discovery Domain Feature Bitmap"); case ISNS_DD_SYM_NAME : return("Discovery Domain Symbolic Name"); case ISNS_DD_ISCSI_MEMBER : return("Discovery Domain iSCSI Member"); case ISNS_DD_IFCP_MEMBER : return("Discovery Domain iFCP Member"); case ISNS_COMPANY_OUI : return("Company OUI"); ! case ISNS_ENTITY_IDX : return("Entity Index"); ! case ISNS_ISCSI_IDX : return("iSCSI Index"); ! case ISNS_PORTAL_IDX : return("Portal Index"); ! case ISNS_DD_ISCSI_MEMBER_IDX: return("Discovery Domain iSCSI Member Index"); ! case ISNS_DD_ACTIVE : return("Discovery Domain Active"); ! case ISNS_NODE_ACTIVE : return("Node Active"); ! case ISNS_SCN_PORT : return("SCN Port"); ! case ISNS_PORTAL_GROUP : return("Portal Group Tag (depreciated)"); ! case ISNS_PORTAL_GROUP_TAG : return("Portal Group Tag"); ! case ISNS_PORTAL_GROUP_ISCSI_NAME : return("Portal Group ISCSI Name"); ! case ISNS_PORTAL_GROUP_IP : return("Portal Group IP Address"); ! case ISNS_PORTAL_GROUP_PORT : return("Portal Group TCP/UDP Port"); ! case ISNS_PORTAL_SECURITY_BITMAP: return("Portal Security Bitmap"); default : return("Unknown TAG code"); } |