Print this page
re #8726 rb4027 Autogenerated iSCSI initiator IQN should use com.nexenta instead of com.sun

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/adapters/iscsi/iscsid.c
          +++ new/usr/src/uts/common/io/scsi/adapters/iscsi/iscsid.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
       21 +
  21   22  /*
  22   23   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  23   25   */
  24   26  
  25   27  /*
  26   28   * ISCSID --
  27   29   *
  28   30   * Discovery of targets and access to the persistent storage starts here.
  29   31   */
  30   32  
  31   33  #include <sys/thread.h>
  32   34  #include <sys/types.h>
↓ open down ↓ 1936 lines elided ↑ open up ↑
1969 1971                  (void) iscsid_add(ihp, iSCSIDiscoveryMethodISNS, &addr_dsc.sin,
1970 1972                      (char *)pg_list->pg_list[i].pg_iscsi_name,
1971 1973                      pg_list->pg_list[i].pg_tag, &addr_tgt.sin);
1972 1974          }
1973 1975  }
1974 1976  
1975 1977  /*
1976 1978   * set_initiator_name - set default initiator name and alias.
1977 1979   *
1978 1980   * This sets the default initiator name and alias.  The
1979      - * initiator name is composed of sun's reverse domain name
1980      - * and registration followed and a unique classifier.  This
1981      - * classifier is the mac address of the first NIC in the
     1981 + * initiator name is composed of vendor's reverse domain name
     1982 + * and registration date followed by a unique classifier.
     1983 + * This classifier is the mac address of the first NIC in the
1982 1984   * host and a timestamp to make sure the classifier is
1983 1985   * unique if the NIC is moved between hosts.  The alias
1984 1986   * is just the hostname.
1985 1987   */
1986 1988  void
1987 1989  iscsid_set_default_initiator_node_settings(iscsi_hba_t *ihp, boolean_t minimal)
1988 1990  {
1989 1991          int                 i;
1990 1992          time_t              x;
1991 1993          struct ether_addr   eaddr;
1992 1994          char                val[10];
1993 1995          iscsi_chap_props_t  *chap = NULL;
1994 1996  
1995 1997          /* Set default initiator-node name */
1996 1998          if (iscsiboot_prop && iscsiboot_prop->boot_init.ini_name != NULL) {
1997 1999                  (void) strncpy((char *)ihp->hba_name,
1998 2000                      (const char *)iscsiboot_prop->boot_init.ini_name,
1999 2001                      ISCSI_MAX_NAME_LEN);
2000 2002          } else {
2001      -                (void) snprintf((char *)ihp->hba_name,
2002      -                    ISCSI_MAX_NAME_LEN,
2003      -                    "iqn.1986-03.com.sun:01:");
     2003 +                (void) snprintf((char *)ihp->hba_name, ISCSI_MAX_NAME_LEN,
     2004 +                    "iqn.2005-07.com.nexenta:01:");
2004 2005  
2005 2006                  (void) localetheraddr(NULL, &eaddr);
2006 2007                  for (i = 0; i <  ETHERADDRL; i++) {
2007 2008                          (void) snprintf(val, sizeof (val), "%02x",
2008 2009                              eaddr.ether_addr_octet[i]);
2009 2010                          (void) strncat((char *)ihp->hba_name, val,
2010 2011                              ISCSI_MAX_NAME_LEN);
2011 2012                  }
2012 2013  
2013 2014                  /* Set default initiator-node alias */
↓ open down ↓ 511 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX