Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package open-iscsi for openSUSE:Factory 
checked in at 2021-09-11 22:24:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/open-iscsi (Old)
 and      /work/SRC/openSUSE:Factory/.open-iscsi.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "open-iscsi"

Sat Sep 11 22:24:26 2021 rev:108 rq:917766 version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/open-iscsi/open-iscsi.changes    2021-08-26 
23:14:18.208273903 +0200
+++ /work/SRC/openSUSE:Factory/.open-iscsi.new.1899/open-iscsi.changes  
2021-09-11 22:24:53.479407949 +0200
@@ -1,0 +2,12 @@
+Wed Sep  8 22:11:35 UTC 2021 - Lee Duncan <ldun...@suse.com>
+
+- Updated to latest upstream 2.1.5 as 2.1.5-suse, which contains
+  these changes not already present:
+  * Handle IPv6 interfaces correctly. (bsc#1187958)
+  * Handle qedi correctly in NPAR mode (bsc#1187958)
+  * Update iscsiadm man page (bsc#1187958)
+  * Update iface.example for ipv6
+  * Change iscsi IP type from defines to enum.
+  * Handle recv() returning 0 in iscsid_response()
+
+-------------------------------------------------------------------

Old:
----
  open-iscsi-2.1.4-suse.tar.bz2

New:
----
  open-iscsi-2.1.5-suse.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ open-iscsi.spec ++++++
--- /var/tmp/diff_new_pack.WLhnGX/_old  2021-09-11 22:24:53.971408434 +0200
+++ /var/tmp/diff_new_pack.WLhnGX/_new  2021-09-11 22:24:53.975408438 +0200
@@ -17,10 +17,10 @@
 
 
 %define iscsi_minor_release 1
-%define iscsi_patch_release 4
+%define iscsi_patch_release 5
 %define iscsi_patch_release_suse %{iscsi_patch_release}-suse
 Name:           open-iscsi
-Version:        2.1.4
+Version:        2.1.5
 Release:        0
 Summary:        Linux iSCSI Software Initiator
 License:        GPL-2.0-or-later

++++++ open-iscsi-2.1.4-suse.tar.bz2 -> open-iscsi-2.1.5-suse.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/Changelog 
new/open-iscsi-2.1.5-suse/Changelog
--- old/open-iscsi-2.1.4-suse/Changelog 2021-03-12 18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/Changelog 2021-09-09 00:33:40.000000000 +0200
@@ -1,3 +1,30 @@
+open-iscsi-2.1.4 - open-iscsi-2.1.5
+
+Chris Leech (1):
+      iscsistart: fix null pointer deref before exit
+
+Lee Duncan (8):
+      Add iscsiadm "no wait" option for firmware login.
+      Set default 'startup' to 'onboot' for FW nodes
+      Support the "qede" CNA-card driver.
+      Handle qedi correctly in NPAR mode
+      Change iscsi IP type from defines to enum.
+      Update iface.example for ipv6
+      Update iscsiadm man page
+      Handle IPv6 interfaces correctly.
+
+Manish Rangankar (1):
+      bnx2x.c: Re-initialize bp->version with baseline version.
+
+Mike Christie (1):
+      iscsid: set PR_SET_IO_FLUSHER
+
+gulams (3):
+      Log error message when auth debug status is set
+      Check ISCSI_ERR_ISCSID_NOTCONN in iscsistart login
+      Handle recv() returning 0 in iscsid_response()
+
+
 open-iscsi-2.1.3 - open-iscsi-2.1.4
 
 Abhinav Rajagopalan (1):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/doc/iscsiadm.8 
new/open-iscsi-2.1.5-suse/doc/iscsiadm.8
--- old/open-iscsi-2.1.4-suse/doc/iscsiadm.8    2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/doc/iscsiadm.8    2021-09-09 00:33:40.000000000 
+0200
@@ -35,13 +35,12 @@
 .RB [ \-P
 .IR printlevel ]
 .RB [ \-I
-.IB iface\  \-t\  type\  \-p\  ip:port
-.RB [ \-l ]
-] | [
+.IR iface ]
+.RB [ \-t
+.IR  type ]
 .RB [ \-p
 .IR ip:port ]
-.RB [ \-l | \-D ]
-]
+.RB [ \-l ]
 .PP
 .B iscsiadm
 .B \-m node
@@ -123,6 +122,7 @@
 .RB [ \-d
 .IR debug_level ]
 .RB [ \-l ]
+.RB [ \-W ]
 .PP
 .B iscsiadm
 .B \-m host
@@ -304,7 +304,8 @@
 for session mode).
 .TP
 \fB\-W\fR, \fB\-\-\-no_wait\fR
-In node mode, do not wait for a response from the targets.
+In node, discovery, or firmware mode,
+do not wait for a response from the targets.
 This means that success will be returned if the command is able to
 send the login requests, whether or not they succeed. In this case, it will
 be up to the caller to poll for success (i.e. session creation).
@@ -471,6 +472,11 @@
 This option is only valid for chap and flashnode submodes of host mode.
 .SH DISCOVERY TYPES
 iSCSI defines 3 discovery types: SendTargets, SLP, and iSNS.
+.PP
+A special discovery type called
+.I fw
+(for firmware) is also supported, for discoverying firmware interfaces,
+and populating the interface database in the process.
 .TP
 .B
 SendTargets
@@ -492,6 +498,7 @@
 .TP
 .B
 fw
+Firmware mode.
 Several NICs and systems contain a mini iSCSI initiator which can be used
 for boot. To get the values used for boot the fw option can be used.
 Doing fw discovery, does not store persistent records in the node or
@@ -501,17 +508,9 @@
 Performing fw discovery will print the portals, like with other discovery
 methods. To see other settings like CHAP values and initiator settings,
 like you would in node mode, run \fIiscsiadm \-m fw\fR.
-.IP
-fw support in open-iscsi is experimental. The settings and iscsiadm
-syntax and output format may change.
 .P
-iscsiadm supports the
-.B
-iSNS (isns)
-or
-.B
-SendTargets (st)
-discovery type. An SLP implementation is under development.
+Note that the SLP implementation is under development and currently
+is not supported.
 .SH EXIT STATUS
 On success 0 is returned. On error one of the return codes below will
 be returned.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/etc/iface.example 
new/open-iscsi-2.1.5-suse/etc/iface.example
--- old/open-iscsi-2.1.4-suse/etc/iface.example 2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/etc/iface.example 2021-09-09 00:33:40.000000000 
+0200
@@ -91,6 +91,13 @@
 # example
 # iface.vlan_state = enable
 
+#
+# The IPv6 attributes require the interface file
+# be named with the string "ipv6" in it. Otherwise,
+# parsing such a file will cause errors, since IPv4
+# is otherwise assumed.
+#
+
 # OPTIONAL: iface.ipv6_linklocal
 # Specify the IPV6 Link Local Address with the
 # link local prefix of FE80::0/64
@@ -155,7 +162,7 @@
 #
 # IPV6 sample config file with neighbor discovery:
 #  BEGIN RECORD 2.0-872
-# iface.iscsi_ifacename = qla4xxx-3-1
+# iface.iscsi_ifacename = qla4xxx-3-1-ipv6
 # iface.ipaddress =
 # iface.hwaddress = 00:0e:1e:04:93:92
 # iface.transport_name = qla4xxx
@@ -182,7 +189,7 @@
 
 # Sample ipv6 config file(manual configured IPs):
 # BEGIN RECORD 2.0-872
-# iface.iscsi_ifacename = iface-new-file
+# iface.iscsi_ifacename = iface-new-file-ipv6
 # iface.ipaddress = fec0:ce00:7014:0041:1111:2222:1e04:9392
 # iface.hwaddress = 00:0e:1e:04:93:92
 # iface.transport_name = qla4xxx
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/etc/systemd/iscsi.service 
new/open-iscsi-2.1.5-suse/etc/systemd/iscsi.service
--- old/open-iscsi-2.1.4-suse/etc/systemd/iscsi.service 2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/etc/systemd/iscsi.service 2021-09-09 
00:33:40.000000000 +0200
@@ -9,6 +9,8 @@
 [Service]
 Type=oneshot
 ExecStart=/sbin/iscsiadm -m node --loginall=automatic -W
+ExecStart=/sbin/iscsiadm -m node --loginall=onboot -W
+ExecStart=/sbin/iscsiadm -m fw -l -W
 ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
 ExecStop=/sbin/iscsiadm -m node --logoutall=manual
 SuccessExitStatus=21 15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/include/iscsi_if.h 
new/open-iscsi-2.1.5-suse/include/iscsi_if.h
--- old/open-iscsi-2.1.4-suse/include/iscsi_if.h        2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/include/iscsi_if.h        2021-09-09 
00:33:40.000000000 +0200
@@ -393,8 +393,11 @@
 #define ISCSI_IPV6_ROUTER_AUTOCFG_ENABLE       0x01
 #define ISCSI_IPV6_ROUTER_AUTOCFG_DISABLE      0x02
 
-#define ISCSI_IFACE_TYPE_IPV4          0x01
-#define ISCSI_IFACE_TYPE_IPV6          0x02
+/* Interface IP Type */
+enum iscsi_iface_type {
+       ISCSI_IFACE_TYPE_IPV4                   = 1,
+       ISCSI_IFACE_TYPE_IPV6,
+};
 
 #define ISCSI_MAX_VLAN_ID              4095
 #define ISCSI_MAX_VLAN_PRIORITY                7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/iscsiuio/src/unix/libs/bnx2x.c 
new/open-iscsi-2.1.5-suse/iscsiuio/src/unix/libs/bnx2x.c
--- old/open-iscsi-2.1.4-suse/iscsiuio/src/unix/libs/bnx2x.c    2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/iscsiuio/src/unix/libs/bnx2x.c    2021-09-09 
00:33:40.000000000 +0200
@@ -350,6 +350,13 @@
        return 0;
 }
 
+static void bnx2x_set_drv_version_default(bnx2x_t *bp)
+{
+       bp->version.major = BNX2X_DEFAULT_MAJOR_VERSION;
+       bp->version.minor = BNX2X_DEFAULT_MINOR_VERSION;
+       bp->version.sub_minor = BNX2X_DEFAULT_SUB_MINOR_VERSION;
+}
+
 /**
  * bnx2x_get_drv_version() - Used to determine the driver version
  * @param bp - Device used to determine bnx2x driver version
@@ -405,8 +412,7 @@
        }
        bp->version.sub_minor = atoi(tok);
 
-       LOG_INFO(PFX "%s: bnx2x driver using version %d.%d.%d",
-                nic->log_name,
+       LOG_INFO(PFX "%s: interface version %d.%d.%d", nic->log_name,
                 bp->version.major, bp->version.minor, bp->version.sub_minor);
 
        close(fd);
@@ -710,7 +716,14 @@
                /* If version is unknown, go read from ethtool */
                rc = bnx2x_get_drv_version(bp);
                if (rc)
-                       goto open_error;
+                       bnx2x_set_drv_version_default(bp);
+               else if (!(bnx2x_is_ver60_plus(bp) || bnx2x_is_ver52(bp)))
+                       bnx2x_set_drv_version_default(bp);
+
+               LOG_INFO(PFX "%s: bnx2x Use baseline version %d.%d.%d",
+                        nic->log_name,
+                        bp->version.major, bp->version.minor,
+                        bp->version.sub_minor);
        } else {
                /* Version is not unknown, just use it */
                bnx2x_version.major = bp->version.major;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/iscsiuio/src/unix/libs/bnx2x.h 
new/open-iscsi-2.1.5-suse/iscsiuio/src/unix/libs/bnx2x.h
--- old/open-iscsi-2.1.4-suse/iscsiuio/src/unix/libs/bnx2x.h    2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/iscsiuio/src/unix/libs/bnx2x.h    2021-09-09 
00:33:40.000000000 +0200
@@ -615,6 +615,9 @@
        __u16 reserved;
 };
 
+#define BNX2X_DEFAULT_MAJOR_VERSION    1
+#define BNX2X_DEFAULT_MINOR_VERSION    70
+#define BNX2X_DEFAULT_SUB_MINOR_VERSION        1
 #define BNX2X_UNKNOWN_MAJOR_VERSION    -1
 #define BNX2X_UNKNOWN_MINOR_VERSION    -1
 #define BNX2X_UNKNOWN_SUB_MINOR_VERSION        -1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/libopeniscsiusr/idbm.c 
new/open-iscsi-2.1.5-suse/libopeniscsiusr/idbm.c
--- old/open-iscsi-2.1.4-suse/libopeniscsiusr/idbm.c    2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/libopeniscsiusr/idbm.c    2021-09-09 
00:33:40.000000000 +0200
@@ -303,7 +303,7 @@
        enum modify_mode        can_modify;
 };
 
-static void _idbm_node_rec_link(struct iscsi_node *node, struct idbm_rec 
*recs);
+static void _idbm_node_rec_link(struct iscsi_node *node, struct idbm_rec 
*recs, const char *iface_name);
 
 int _idbm_lock(struct iscsi_context *ctx)
 {
@@ -394,6 +394,10 @@
                                 struct idbm_rec *recs, int num)
 {
        int init_num = num;
+
+       if (strstr(iface->name, "ipv6"))
+               iface->is_ipv6 = true;
+
        if (init_num == 0)
                _rec_str(IFACE_ISCSINAME, recs, iface, name, IDBM_SHOW, num,
                         _CANNOT_MODIFY);
@@ -587,7 +591,7 @@
        if (recs == NULL)
                return;
 
-       _idbm_node_rec_link(node, recs);
+       _idbm_node_rec_link(node, recs, NULL);
        _idbm_recs_print(recs, f, show_secret ? IDBM_SHOW : IDBM_MASKED);
        _idbm_recs_free(recs);
 }
@@ -977,7 +981,7 @@
        { "SHA3-256", ISCSI_AUTH_CHAP_ALG_SHA3_256 },
 };
 
-static void _idbm_node_rec_link(struct iscsi_node *node, struct idbm_rec *recs)
+static void _idbm_node_rec_link(struct iscsi_node *node, struct idbm_rec 
*recs, const char *iface_name)
 {
        int num = 0;
 
@@ -990,6 +994,10 @@
        _rec_bool(NODE_LEADING_LOGIN, recs, node, leading_login, IDBM_SHOW,
                  num, _CAN_MODIFY);
 
+       /* use the interface name passed in, if any */
+       if (iface_name)
+               strncpy((*node).iface.name, iface_name, ISCSI_MAX_IFACE_LEN);
+
        /*
         * Note: because we do not add the iface.iscsi_ifacename to
         * sysfs iscsiadm does some weird matching. We can change the iface
@@ -1153,7 +1161,7 @@
        recs = _idbm_recs_alloc();
        _alloc_null_check(ctx, recs, rc, out);
 
-       _idbm_node_rec_link(*node, recs);
+       _idbm_node_rec_link(*node, recs, iface_name);
 
        _good(_idbm_recs_read(ctx, recs, conf_path), rc, out);
 
@@ -1180,8 +1188,6 @@
                         (*node)->conn.port);
        }
 
-
-
 out:
        if (rc != LIBISCSI_OK) {
                iscsi_node_free(*node);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/libopeniscsiusr/iface.c 
new/open-iscsi-2.1.5-suse/libopeniscsiusr/iface.c
--- old/open-iscsi-2.1.4-suse/libopeniscsiusr/iface.c   2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/libopeniscsiusr/iface.c   2021-09-09 
00:33:40.000000000 +0200
@@ -86,6 +86,29 @@
 _iscsi_getter_func_gen(iscsi_iface, port_speed, const char *);
 _iscsi_getter_func_gen(iscsi_iface, name, const char *);
 
+/*
+ * ipv6 address strings will have at least two colons
+ *
+ * NOTE: does NOT validate the IP address
+ */
+static bool lib_ipaddr_is_ipv6(struct iscsi_context *ctx, char *ipaddr)
+{
+       char *first_colon, *second_colon;
+       bool res = false;
+
+       if (ipaddr) {
+               first_colon = strchr(ipaddr, ':');
+               if (first_colon) {
+                       second_colon = strchr(first_colon+1, ':');
+                       if (second_colon &&
+                           (second_colon != first_colon))
+                               res = true;
+               }
+       }
+       _debug(ctx, "ipaddr=\"%s\" -> %u", ipaddr, res);
+       return res;
+}
+
 int _iscsi_iface_get_from_sysfs(struct iscsi_context *ctx, uint32_t host_id,
                                uint32_t sid, char *iface_kern_id,
                                struct iscsi_iface **iface)
@@ -203,8 +226,10 @@
                if (bound_by_hwaddr)
                        snprintf((*iface)->name,
                                 sizeof((*iface)->name)/sizeof(char),
-                                "%s.%s", (*iface)->transport_name,
-                                (*iface)->hwaddress);
+                                "%s.%s.%s.%u", (*iface)->transport_name,
+                                (*iface)->hwaddress,
+                                lib_ipaddr_is_ipv6(ctx, (*iface)->ipaddress) ? 
"ipv6" : "ipv4",
+                                (*iface)->iface_num);
        }
 
        if (strcmp((*iface)->name, "") == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/libopeniscsiusr/version.h 
new/open-iscsi-2.1.5-suse/libopeniscsiusr/version.h
--- old/open-iscsi-2.1.4-suse/libopeniscsiusr/version.h 2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/libopeniscsiusr/version.h 2021-09-09 
00:33:40.000000000 +0200
@@ -25,6 +25,6 @@
  * This may not be the same value as the kernel versions because
  * some other maintainer could merge a patch without going through us
  */
-#define ISCSI_VERSION_STR      "2.1.4"
+#define ISCSI_VERSION_STR      "2.1.5"
 
 #endif  /* End of __ISCSI_OPEN_USR_VERSION_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/idbm.c 
new/open-iscsi-2.1.5-suse/usr/idbm.c
--- old/open-iscsi-2.1.4-suse/usr/idbm.c        2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/idbm.c        2021-09-09 00:33:40.000000000 
+0200
@@ -2458,6 +2458,12 @@
                rc = idbm_delete_node(&rec);
                if (rc)
                        goto unlock;
+
+               if (drec->type == DISCOVERY_TYPE_FW) {
+                       log_debug(8, "setting firmware node 'startup' to 
'onboot'");
+                       newrec->startup = ISCSI_STARTUP_ONBOOT;
+                       newrec->conn[0].startup = ISCSI_STARTUP_ONBOOT;
+               }
                log_debug(7, "overwriting existing record");
        } else
                log_debug(7, "adding new DB record");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iface.c 
new/open-iscsi-2.1.5-suse/usr/iface.c
--- old/open-iscsi-2.1.4-suse/usr/iface.c       2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iface.c       2021-09-09 00:33:40.000000000 
+0200
@@ -445,25 +445,34 @@
        return ISCSI_ERR_NO_OBJS_FOUND;
 }
 
-int iface_get_iptype(struct iface_rec *iface)
+/*
+ * detect IPv4 vs IPv4 IP address
+ */
+enum iscsi_iface_type iface_get_iptype(struct iface_rec *iface)
 {
+       enum iscsi_iface_type res = ISCSI_IFACE_TYPE_IPV4;
+
        /* address might not be set if user config with another tool */
        if (!strlen(iface->ipaddress) ||
            !strcmp(UNKNOWN_VALUE, iface->ipaddress)) {
-               /* try to figure out by name */
-               if (strstr(iface->name, "ipv4"))
-                       return ISCSI_IFACE_TYPE_IPV4;
-               else if (strstr(iface->name, "ipv6"))
-                       return ISCSI_IFACE_TYPE_IPV6;
-               else    /* assume ipv4 by default */
-                       return ISCSI_IFACE_TYPE_IPV4;
+               /* unknown or empty IP address: try to figure out by name */
+               if (strstr(iface->name, "ipv6"))
+                       res = ISCSI_IFACE_TYPE_IPV6;
        } else {
+               /* figure out what type of IP address string we have */
                if (strcmp(iface->bootproto, "dhcp") &&
-                   !strstr(iface->ipaddress, "."))
-                       return ISCSI_IFACE_TYPE_IPV6;
-               else
-                       return ISCSI_IFACE_TYPE_IPV4;
+                   !strchr(iface->ipaddress, '.')) {
+                       /* bootproto is NOT "dhcp", IP addr does NOT have a dot 
in it */
+                       res = ISCSI_IFACE_TYPE_IPV6;
+               }
        }
+
+       log_debug(8, "iface: ipaddr=\"%s\" name=\"%s\" bootproto=\"%s\" -> %s",
+                       iface->ipaddress, iface->name,
+                       iface->bootproto,
+                       res == ISCSI_IFACE_TYPE_IPV4 ? "IPv4" : "IPv6");
+
+       return res;
 }
 
 static int iface_setup_binding_from_kern_iface(void *data,
@@ -986,6 +995,30 @@
        iface_for_each_iface(ifaces, 1, &nr_found, iface_link);
 }
 
+/*
+ * ipv6 address strings will have at least two colons
+ *
+ * NOTE: does NOT validate the IP address
+ */
+static bool ipaddr_is_ipv6(char *ipaddr)
+{
+       char *first_colon, *second_colon;
+       bool res = false;
+
+       if (ipaddr) {
+               first_colon = strchr(ipaddr, ':');
+               if (first_colon) {
+                       second_colon = strchr(first_colon+1, ':');
+                       if (second_colon &&
+                           (second_colon != first_colon))
+                               res = true;
+               }
+       }
+       log_debug(8, "%s(%s) -> %u",
+               __FUNCTION__, ipaddr, res);
+       return res;
+}
+
 /**
  * iface_setup_from_boot_context - setup iface from boot context info
  * @iface: iface t setup
@@ -1059,9 +1092,6 @@
        }
        strcpy(iface->transport_name, t->name);
 
-       memset(iface->name, 0, sizeof(iface->name));
-       snprintf(iface->name, sizeof(iface->name), "%s.%s",
-                iface->transport_name, context->mac);
        strlcpy(iface->hwaddress, context->mac,
                sizeof(iface->hwaddress));
        strlcpy(iface->ipaddress, context->ipaddr,
@@ -1071,6 +1101,11 @@
                sizeof(iface->subnet_mask));
        strlcpy(iface->gateway, context->gateway,
                sizeof(iface->gateway));
+       snprintf(iface->name, sizeof(iface->name), "%s.%s.%s.%u",
+                iface->transport_name, context->mac,
+                ipaddr_is_ipv6(iface->ipaddress) ?  "ipv6" : "ipv4",
+                iface->iface_num);
+
        log_debug(1, "iface " iface_fmt "", iface_str(iface));
        return 1;
 }
@@ -1211,7 +1246,7 @@
 static int __iface_get_param_count(void *data, struct iface_rec *iface)
 {
        struct iface_param_count *iface_params = data;
-       int iptype = ISCSI_IFACE_TYPE_IPV4;
+       enum iscsi_iface_type iptype;
        int count = 0;
 
        if (strcmp(iface_params->primary->hwaddress, iface->hwaddress))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iface.h 
new/open-iscsi-2.1.5-suse/usr/iface.h
--- old/open-iscsi-2.1.4-suse/usr/iface.h       2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iface.h       2021-09-09 00:33:40.000000000 
+0200
@@ -59,7 +59,7 @@
                                 int iface_all);
 extern int iface_build_net_config(struct iface_rec *iface_primary,
                                  int iface_all, struct iovec *iovs);
-extern int iface_get_iptype(struct iface_rec *iface);
+extern enum iscsi_iface_type iface_get_iptype(struct iface_rec *iface);
 
 #define iface_fmt "[hw=%s,ip=%s,net_if=%s,iscsi_if=%s]"
 #define iface_str(_iface) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iscsiadm.c 
new/open-iscsi-2.1.5-suse/usr/iscsiadm.c
--- old/open-iscsi-2.1.4-suse/usr/iscsiadm.c    2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iscsiadm.c    2021-09-09 00:33:40.000000000 
+0200
@@ -114,7 +114,7 @@
        [MODE_SESSION] = {"session", "PiRdrmusonuSv", 1},
        [MODE_HOST] = {"host", "CHdmPotnvxA", 0},
        [MODE_IFACE] = {"iface", "HIdnvmPoCabci", 0},
-       [MODE_FW] = {"fw", "dml", 0},
+       [MODE_FW] = {"fw", "dmlW", 0},
 };
 
 static struct option const long_options[] =
@@ -163,12 +163,12 @@
                printf("\
 iscsiadm -m discoverydb [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-Dl]] | [[-p ip:port -t type] \
 [-o operation] [-n name] [-v value] [-lD]] \n\
-iscsiadm -m discovery [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-l]] | [[-p ip:port] [-l | -D]] \n\
+iscsiadm -m discovery [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-l]] | [[-p ip:port] [-l | -D]] [-W]\n\
 iscsiadm -m node [-hV] [-d debug_level] [-P printlevel] [-L 
all,manual,automatic,onboot] [-W] [-U all,manual,automatic,onboot] [-S] [[-T 
targetname -p ip:port -I ifaceN] [-l | -u | -R | -s]] \
 [[-o  operation ] [-n name] [-v value]]\n\
 iscsiadm -m session [-hV] [-d debug_level] [-P  printlevel] [-r sessionid | 
sysfsdir [-R | -u | -s] [-o operation] [-n name] [-v value]]\n\
 iscsiadm -m iface [-hV] [-d debug_level] [-P printlevel] [-I ifacename | -H 
hostno|MAC] [[-o  operation ] [-n name] [-v value]] [-C ping [-a ip] [-b 
packetsize] [-c count] [-i interval]]\n\
-iscsiadm -m fw [-d debug_level] [-l]\n\
+iscsiadm -m fw [-d debug_level] [-l] [-W]\n\
 iscsiadm -m host [-P printlevel] [-H hostno|MAC] [[-C chap [-x chap_tbl_idx]] 
| [-C flashnode [-A portal_type] [-x flashnode_idx]] | [-C stats]] [[-o 
operation] [-n name] [-v value]] \n\
 iscsiadm -k priority\n");
        }
@@ -3014,7 +3014,7 @@
 }
 
 static int exec_fw_op(discovery_rec_t *drec, struct list_head *ifaces,
-                     int info_level, int do_login, int op)
+                     int info_level, int do_login, int op, bool wait)
 {
        struct boot_context *context;
        LIST_HEAD(targets);
@@ -3043,7 +3043,10 @@
                                break;
                        }
 
-                       iscsi_login_portal(NULL, NULL, rec);
+                       if (wait)
+                               iscsi_login_portal(NULL, NULL, rec);
+                       else
+                               iscsi_login_portal_nowait(rec);
                        free(rec);
                }
        } else {
@@ -3202,7 +3205,7 @@
                }
 
                drec.type = DISCOVERY_TYPE_FW;
-               rc = exec_fw_op(&drec, ifaces, info_level, do_login, op);
+               rc = exec_fw_op(&drec, ifaces, info_level, do_login, op, true);
                goto done;
        default:
                rc = ISCSI_ERR_INVAL;
@@ -3263,7 +3266,8 @@
                        int do_discover,
                        int op,
                        __attribute__((unused))struct list_head *params,
-                       int do_show)
+                       int do_show,
+                       bool wait)
 {
        struct discovery_rec drec;
        int rc = 0;
@@ -3319,7 +3323,7 @@
                break;
        case DISCOVERY_TYPE_FW:
                drec.type = DISCOVERY_TYPE_FW;
-               rc = exec_fw_op(&drec, ifaces, info_level, do_login, op);
+               rc = exec_fw_op(&drec, ifaces, info_level, do_login, op, wait);
                break;
        default:
                if (ip) {
@@ -3801,7 +3805,7 @@
                usage(ISCSI_ERR_INVAL);
 
        if (mode == MODE_FW) {
-               rc = exec_fw_op(NULL, NULL, info_level, do_login, op);
+               rc = exec_fw_op(NULL, NULL, info_level, do_login, op, wait);
                goto out;
        }
 
@@ -3904,7 +3908,7 @@
        case MODE_DISCOVERY:
                rc = exec_disc_op(type, ip, port, &ifaces, info_level,
                                  do_login, do_discover, op, &params,
-                                 do_show);
+                                 do_show, wait);
                break;
        case MODE_NODE:
                if (do_login_all) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iscsid.c 
new/open-iscsi-2.1.5-suse/usr/iscsid.c
--- old/open-iscsi-2.1.4-suse/usr/iscsid.c      2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iscsid.c      2021-09-09 00:33:40.000000000 
+0200
@@ -34,6 +34,7 @@
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/prctl.h>
 #ifndef        NO_SYSTEMD
 #include <systemd/sd-daemon.h>
 #endif
@@ -56,6 +57,10 @@
 #include "iscsid_req.h"
 #include "iscsi_err.h"
 
+#ifndef PR_SET_IO_FLUSHER
+#define PR_SET_IO_FLUSHER 57
+#endif
+
 /* global config info */
 struct iscsi_daemon_config daemon_config;
 struct iscsi_daemon_config *dconfig = &daemon_config;
@@ -616,6 +621,15 @@
                exit(ISCSI_ERR);
        }
 
+       if (prctl(PR_SET_IO_FLUSHER, 1, 0, 0, 0) == -1) {
+               if (errno == EINVAL) {
+                       log_info("prctl could not mark iscsid with the 
PR_SET_IO_FLUSHER flag, because the feature is not supported in this kernel. 
Will proceed, but iscsid may hang during session level recovery if memory is 
low.\n");
+               } else {
+                       log_error("prctl could not mark iscsid with the 
PR_SET_IO_FLUSHER flag due to error %s\n",
+                                 strerror(errno));
+               }
+       }
+
        set_state_to_ready();
        event_loop(ipc, control_fd, mgmt_ipc_fd);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iscsid_req.c 
new/open-iscsi-2.1.5-suse/usr/iscsid_req.c
--- old/open-iscsi-2.1.4-suse/usr/iscsid_req.c  2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iscsid_req.c  2021-09-09 00:33:40.000000000 
+0200
@@ -165,7 +165,7 @@
                        return ISCSI_ERR_ISCSID_COMM_ERR;
                } else if (pfd.revents & POLLIN) {
                        err = recv(fd, rsp, sizeof(*rsp), MSG_WAITALL);
-                       if (err < 0) {
+                       if (err <= 0) {
                                log_error("read error (%d/%d), daemon died?",
                                          err, errno);
                                break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/iscsistart.c 
new/open-iscsi-2.1.5-suse/usr/iscsistart.c
--- old/open-iscsi-2.1.4-suse/usr/iscsistart.c  2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/iscsistart.c  2021-09-09 00:33:40.000000000 
+0200
@@ -259,7 +259,8 @@
                rc = iscsid_exec_req(&req, &rsp, 0, tmo);
                if (rc == 0) {
                        return rc;
-               } else if (rc == ISCSI_ERR_SESSION_NOT_CONNECTED) {
+               } else if (rc == ISCSI_ERR_SESSION_NOT_CONNECTED ||
+                          rc == ISCSI_ERR_ISCSID_NOTCONN) {
                        ts.tv_sec = msec / 1000;
                        ts.tv_nsec = (msec % 1000) * 1000000L;
 
@@ -360,7 +361,7 @@
        struct boot_context *context, boot_context;
        struct sigaction sa_old;
        struct sigaction sa_new;
-       struct user_param *param;
+       struct user_param *param, *tmp_param;
        int control_fd, mgmt_ipc_fd, err;
        pid_t pid;
 
@@ -555,7 +556,7 @@
        mgmt_ipc_close(mgmt_ipc_fd);
        free_initiator();
        sysfs_cleanup();
-       list_for_each_entry(param, &user_params, list) {
+       list_for_each_entry_safe(param, tmp_param, &user_params, list) {
                list_del(&param->list);
                idbm_free_user_param(param);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/login.c 
new/open-iscsi-2.1.5-suse/usr/login.c
--- old/open-iscsi-2.1.4-suse/usr/login.c       2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/login.c       2021-09-09 00:33:40.000000000 
+0200
@@ -624,7 +624,7 @@
        case AUTH_STATUS_ERROR:
        case AUTH_STATUS_FAIL:
        default:
-               if (acl_get_dbg_status(auth_client, &debug_status) !=
+               if (acl_get_dbg_status(auth_client, &debug_status) ==
                    AUTH_STATUS_NO_ERROR)
                        log_error("Login authentication failed "
                                       "with target %s, %s",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/usr/version.h 
new/open-iscsi-2.1.5-suse/usr/version.h
--- old/open-iscsi-2.1.4-suse/usr/version.h     2021-03-12 18:07:07.000000000 
+0100
+++ new/open-iscsi-2.1.5-suse/usr/version.h     2021-09-09 00:33:40.000000000 
+0200
@@ -6,7 +6,7 @@
  * This may not be the same value as the kernel versions because
  * some other maintainer could merge a patch without going through us
  */
-#define ISCSI_VERSION_STR      "2.1.4"
+#define ISCSI_VERSION_STR      "2.1.5"
 #define ISCSI_VERSION_FILE     "/sys/module/scsi_transport_iscsi/version"
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/open-iscsi-2.1.4-suse/utils/iscsi_offload 
new/open-iscsi-2.1.5-suse/utils/iscsi_offload
--- old/open-iscsi-2.1.4-suse/utils/iscsi_offload       2021-03-12 
18:07:07.000000000 +0100
+++ new/open-iscsi-2.1.5-suse/utils/iscsi_offload       2021-09-09 
00:33:40.000000000 +0200
@@ -85,10 +85,11 @@
     local h
     local host
     local ifmac
+    local olemacoffset=$3
 
     ifmac=$(ip addr show dev $if | sed -n 's/ *link\/ether \(.*\) brd.*/\1/p')
     m5=$(( 0x${ifmac##*:} ))
-    m5=$(( $m5 + 1 ))
+    m5=$(( $m5 + $olemacoffset ))
     ifmac=$(printf "%s:%02x" ${ifmac%:*} $m5)
     for host in /sys/class/iscsi_host/host* ; do
        if [ -L "$host" ] ; then
@@ -190,6 +191,9 @@
     qla*)
        mod=qla4xxx
        ;;
+    qed*)
+       mod=qedi
+       ;;
 esac
 
 if [ -z "$mod" ] ; then
@@ -215,9 +219,11 @@
 elif [ "$mod" = "cxgb3i" ] ; then
     mac=$(iscsi_macaddress_from_pcidevice $pcipath $IFNAME)
 elif [ "$mod" = "be2iscsi" ] ; then
-    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME)
+    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 1)
 elif [ "$mod" = "qla4xxx" ] ; then
-    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME)
+    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 1)
+elif [ "$mod" = "qede" -o "$mod" = "qedi" ] ; then
+    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME 4)
 fi
 
 if [ -z "$mac" ] ; then

++++++ open-iscsi-SUSE-latest.diff.bz2 ++++++
--- /var/tmp/diff_new_pack.WLhnGX/_old  2021-09-11 22:24:54.299408757 +0200
+++ /var/tmp/diff_new_pack.WLhnGX/_new  2021-09-11 22:24:54.299408757 +0200
@@ -1,315 +0,0 @@
-diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
-index 3729a7297619..5fc69287ddcf 100644
---- a/doc/iscsiadm.8
-+++ b/doc/iscsiadm.8
-@@ -123,6 +123,7 @@ iscsiadm \- open-iscsi administration utility
- .RB [ \-d
- .IR debug_level ]
- .RB [ \-l ]
-+.RB [ \-W ]
- .PP
- .B iscsiadm
- .B \-m host
-@@ -304,7 +305,8 @@ This option is only valid for node mode (it is valid but 
not functional
- for session mode).
- .TP
- \fB\-W\fR, \fB\-\-\-no_wait\fR
--In node mode, do not wait for a response from the targets.
-+In node, discovery, or firmware mode,
-+do not wait for a response from the targets.
- This means that success will be returned if the command is able to
- send the login requests, whether or not they succeed. In this case, it will
- be up to the caller to poll for success (i.e. session creation).
-diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
-index 5e394b9a7248..3d468b9f1ad7 100644
---- a/etc/systemd/iscsi.service
-+++ b/etc/systemd/iscsi.service
-@@ -9,6 +9,8 @@ Wants=network-online.target
- [Service]
- Type=oneshot
- ExecStart=/sbin/iscsiadm -m node --loginall=automatic -W
-+ExecStart=/sbin/iscsiadm -m node --loginall=onboot -W
-+ExecStart=/sbin/iscsiadm -m fw -l -W
- ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
- ExecStop=/sbin/iscsiadm -m node --logoutall=manual
- SuccessExitStatus=21 15
-diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c
-index 0e326d4c949a..7481e86161a6 100644
---- a/iscsiuio/src/unix/libs/bnx2x.c
-+++ b/iscsiuio/src/unix/libs/bnx2x.c
-@@ -350,6 +350,13 @@ static int bnx2x_is_drv_version_unknown(struct 
bnx2x_driver_version *version)
-       return 0;
- }
- 
-+static void bnx2x_set_drv_version_default(bnx2x_t *bp)
-+{
-+      bp->version.major = BNX2X_DEFAULT_MAJOR_VERSION;
-+      bp->version.minor = BNX2X_DEFAULT_MINOR_VERSION;
-+      bp->version.sub_minor = BNX2X_DEFAULT_SUB_MINOR_VERSION;
-+}
-+
- /**
-  * bnx2x_get_drv_version() - Used to determine the driver version
-  * @param bp - Device used to determine bnx2x driver version
-@@ -405,8 +412,7 @@ static int bnx2x_get_drv_version(bnx2x_t *bp)
-       }
-       bp->version.sub_minor = atoi(tok);
- 
--      LOG_INFO(PFX "%s: bnx2x driver using version %d.%d.%d",
--               nic->log_name,
-+      LOG_INFO(PFX "%s: interface version %d.%d.%d", nic->log_name,
-                bp->version.major, bp->version.minor, bp->version.sub_minor);
- 
-       close(fd);
-@@ -710,7 +716,14 @@ static int bnx2x_open(nic_t *nic)
-               /* If version is unknown, go read from ethtool */
-               rc = bnx2x_get_drv_version(bp);
-               if (rc)
--                      goto open_error;
-+                      bnx2x_set_drv_version_default(bp);
-+              else if (!(bnx2x_is_ver60_plus(bp) || bnx2x_is_ver52(bp)))
-+                      bnx2x_set_drv_version_default(bp);
-+
-+              LOG_INFO(PFX "%s: bnx2x Use baseline version %d.%d.%d",
-+                       nic->log_name,
-+                       bp->version.major, bp->version.minor,
-+                       bp->version.sub_minor);
-       } else {
-               /* Version is not unknown, just use it */
-               bnx2x_version.major = bp->version.major;
-diff --git a/iscsiuio/src/unix/libs/bnx2x.h b/iscsiuio/src/unix/libs/bnx2x.h
-index ce55cfc29d49..e204cbb7f49f 100644
---- a/iscsiuio/src/unix/libs/bnx2x.h
-+++ b/iscsiuio/src/unix/libs/bnx2x.h
-@@ -615,6 +615,9 @@ struct ustorm_eth_rx_producers {
-       __u16 reserved;
- };
- 
-+#define BNX2X_DEFAULT_MAJOR_VERSION   1
-+#define BNX2X_DEFAULT_MINOR_VERSION   70
-+#define BNX2X_DEFAULT_SUB_MINOR_VERSION       1
- #define BNX2X_UNKNOWN_MAJOR_VERSION   -1
- #define BNX2X_UNKNOWN_MINOR_VERSION   -1
- #define BNX2X_UNKNOWN_SUB_MINOR_VERSION       -1
-diff --git a/usr/idbm.c b/usr/idbm.c
-index b94b61701a13..e1a9021666e8 100644
---- a/usr/idbm.c
-+++ b/usr/idbm.c
-@@ -2458,6 +2458,12 @@ int idbm_add_node(node_rec_t *newrec, discovery_rec_t 
*drec, int overwrite)
-               rc = idbm_delete_node(&rec);
-               if (rc)
-                       goto unlock;
-+
-+              if (drec->type == DISCOVERY_TYPE_FW) {
-+                      log_debug(8, "setting firmware node 'startup' to 
'onboot'");
-+                      newrec->startup = ISCSI_STARTUP_ONBOOT;
-+                      newrec->conn[0].startup = ISCSI_STARTUP_ONBOOT;
-+              }
-               log_debug(7, "overwriting existing record");
-       } else
-               log_debug(7, "adding new DB record");
-diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
-index 41b7e6f25539..192da6609dde 100644
---- a/usr/iscsiadm.c
-+++ b/usr/iscsiadm.c
-@@ -114,7 +114,7 @@ static const struct verify_mode_t mode_paras[] = {
-       [MODE_SESSION] = {"session", "PiRdrmusonuSv", 1},
-       [MODE_HOST] = {"host", "CHdmPotnvxA", 0},
-       [MODE_IFACE] = {"iface", "HIdnvmPoCabci", 0},
--      [MODE_FW] = {"fw", "dml", 0},
-+      [MODE_FW] = {"fw", "dmlW", 0},
- };
- 
- static struct option const long_options[] =
-@@ -163,12 +163,12 @@ static void usage(int status)
-               printf("\
- iscsiadm -m discoverydb [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-Dl]] | [[-p ip:port -t type] \
- [-o operation] [-n name] [-v value] [-lD]] \n\
--iscsiadm -m discovery [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-l]] | [[-p ip:port] [-l | -D]] \n\
-+iscsiadm -m discovery [-hV] [-d debug_level] [-P printlevel] [-t type -p 
ip:port -I ifaceN ... [-l]] | [[-p ip:port] [-l | -D]] [-W]\n\
- iscsiadm -m node [-hV] [-d debug_level] [-P printlevel] [-L 
all,manual,automatic,onboot] [-W] [-U all,manual,automatic,onboot] [-S] [[-T 
targetname -p ip:port -I ifaceN] [-l | -u | -R | -s]] \
- [[-o  operation ] [-n name] [-v value]]\n\
- iscsiadm -m session [-hV] [-d debug_level] [-P  printlevel] [-r sessionid | 
sysfsdir [-R | -u | -s] [-o operation] [-n name] [-v value]]\n\
- iscsiadm -m iface [-hV] [-d debug_level] [-P printlevel] [-I ifacename | -H 
hostno|MAC] [[-o  operation ] [-n name] [-v value]] [-C ping [-a ip] [-b 
packetsize] [-c count] [-i interval]]\n\
--iscsiadm -m fw [-d debug_level] [-l]\n\
-+iscsiadm -m fw [-d debug_level] [-l] [-W]\n\
- iscsiadm -m host [-P printlevel] [-H hostno|MAC] [[-C chap [-x chap_tbl_idx]] 
| [-C flashnode [-A portal_type] [-x flashnode_idx]] | [-C stats]] [[-o 
operation] [-n name] [-v value]] \n\
- iscsiadm -k priority\n");
-       }
-@@ -3014,7 +3014,7 @@ done:
- }
- 
- static int exec_fw_op(discovery_rec_t *drec, struct list_head *ifaces,
--                    int info_level, int do_login, int op)
-+                    int info_level, int do_login, int op, bool wait)
- {
-       struct boot_context *context;
-       LIST_HEAD(targets);
-@@ -3043,7 +3043,10 @@ static int exec_fw_op(discovery_rec_t *drec, struct 
list_head *ifaces,
-                               break;
-                       }
- 
--                      iscsi_login_portal(NULL, NULL, rec);
-+                      if (wait)
-+                              iscsi_login_portal(NULL, NULL, rec);
-+                      else
-+                              iscsi_login_portal_nowait(rec);
-                       free(rec);
-               }
-       } else {
-@@ -3202,7 +3205,7 @@ static int exec_disc2_op(int disc_type, char *ip, int 
port,
-               }
- 
-               drec.type = DISCOVERY_TYPE_FW;
--              rc = exec_fw_op(&drec, ifaces, info_level, do_login, op);
-+              rc = exec_fw_op(&drec, ifaces, info_level, do_login, op, true);
-               goto done;
-       default:
-               rc = ISCSI_ERR_INVAL;
-@@ -3263,7 +3266,8 @@ static int exec_disc_op(int disc_type,
-                       int do_discover,
-                       int op,
-                       __attribute__((unused))struct list_head *params,
--                      int do_show)
-+                      int do_show,
-+                      bool wait)
- {
-       struct discovery_rec drec;
-       int rc = 0;
-@@ -3319,7 +3323,7 @@ static int exec_disc_op(int disc_type,
-               break;
-       case DISCOVERY_TYPE_FW:
-               drec.type = DISCOVERY_TYPE_FW;
--              rc = exec_fw_op(&drec, ifaces, info_level, do_login, op);
-+              rc = exec_fw_op(&drec, ifaces, info_level, do_login, op, wait);
-               break;
-       default:
-               if (ip) {
-@@ -3801,7 +3805,7 @@ main(int argc, char **argv)
-               usage(ISCSI_ERR_INVAL);
- 
-       if (mode == MODE_FW) {
--              rc = exec_fw_op(NULL, NULL, info_level, do_login, op);
-+              rc = exec_fw_op(NULL, NULL, info_level, do_login, op, wait);
-               goto out;
-       }
- 
-@@ -3904,7 +3908,7 @@ main(int argc, char **argv)
-       case MODE_DISCOVERY:
-               rc = exec_disc_op(type, ip, port, &ifaces, info_level,
-                                 do_login, do_discover, op, &params,
--                                do_show);
-+                                do_show, wait);
-               break;
-       case MODE_NODE:
-               if (do_login_all) {
-diff --git a/usr/iscsid.c b/usr/iscsid.c
-index dc54fec39764..478c83d897c1 100644
---- a/usr/iscsid.c
-+++ b/usr/iscsid.c
-@@ -34,6 +34,7 @@
- #include <sys/wait.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/prctl.h>
- #ifndef       NO_SYSTEMD
- #include <systemd/sd-daemon.h>
- #endif
-@@ -56,6 +57,10 @@
- #include "iscsid_req.h"
- #include "iscsi_err.h"
- 
-+#ifndef PR_SET_IO_FLUSHER
-+#define PR_SET_IO_FLUSHER 57
-+#endif
-+
- /* global config info */
- struct iscsi_daemon_config daemon_config;
- struct iscsi_daemon_config *dconfig = &daemon_config;
-@@ -616,6 +621,15 @@ int main(int argc, char *argv[])
-               exit(ISCSI_ERR);
-       }
- 
-+      if (prctl(PR_SET_IO_FLUSHER, 1, 0, 0, 0) == -1) {
-+              if (errno == EINVAL) {
-+                      log_info("prctl could not mark iscsid with the 
PR_SET_IO_FLUSHER flag, because the feature is not supported in this kernel. 
Will proceed, but iscsid may hang during session level recovery if memory is 
low.\n");
-+              } else {
-+                      log_error("prctl could not mark iscsid with the 
PR_SET_IO_FLUSHER flag due to error %s\n",
-+                                strerror(errno));
-+              }
-+      }
-+
-       set_state_to_ready();
-       event_loop(ipc, control_fd, mgmt_ipc_fd);
- 
-diff --git a/usr/iscsistart.c b/usr/iscsistart.c
-index 755489fc7951..7eb573e0f60a 100644
---- a/usr/iscsistart.c
-+++ b/usr/iscsistart.c
-@@ -259,7 +259,8 @@ static int login_session(struct node_rec *rec)
-               rc = iscsid_exec_req(&req, &rsp, 0, tmo);
-               if (rc == 0) {
-                       return rc;
--              } else if (rc == ISCSI_ERR_SESSION_NOT_CONNECTED) {
-+              } else if (rc == ISCSI_ERR_SESSION_NOT_CONNECTED ||
-+                         rc == ISCSI_ERR_ISCSID_NOTCONN) {
-                       ts.tv_sec = msec / 1000;
-                       ts.tv_nsec = (msec % 1000) * 1000000L;
- 
-@@ -360,7 +361,7 @@ int main(int argc, char *argv[])
-       struct boot_context *context, boot_context;
-       struct sigaction sa_old;
-       struct sigaction sa_new;
--      struct user_param *param;
-+      struct user_param *param, *tmp_param;
-       int control_fd, mgmt_ipc_fd, err;
-       pid_t pid;
- 
-@@ -555,7 +556,7 @@ int main(int argc, char *argv[])
-       mgmt_ipc_close(mgmt_ipc_fd);
-       free_initiator();
-       sysfs_cleanup();
--      list_for_each_entry(param, &user_params, list) {
-+      list_for_each_entry_safe(param, tmp_param, &user_params, list) {
-               list_del(&param->list);
-               idbm_free_user_param(param);
-       }
-diff --git a/usr/login.c b/usr/login.c
-index 2508c48b734e..8af8756242af 100644
---- a/usr/login.c
-+++ b/usr/login.c
-@@ -624,7 +624,7 @@ check_security_stage_status(iscsi_session_t *session,
-       case AUTH_STATUS_ERROR:
-       case AUTH_STATUS_FAIL:
-       default:
--              if (acl_get_dbg_status(auth_client, &debug_status) !=
-+              if (acl_get_dbg_status(auth_client, &debug_status) ==
-                   AUTH_STATUS_NO_ERROR)
-                       log_error("Login authentication failed "
-                                      "with target %s, %s",
-diff --git a/utils/iscsi_offload b/utils/iscsi_offload
-index 7cd1dadcc688..833d26fd8572 100644
---- a/utils/iscsi_offload
-+++ b/utils/iscsi_offload
-@@ -190,6 +190,12 @@ case "$driver" in
-     qla*)
-       mod=qla4xxx
-       ;;
-+    qede)
-+      mod=qede
-+      ;;
-+    qedi)
-+      mod=qedi
-+      ;;
- esac
- 
- if [ -z "$mod" ] ; then
-@@ -218,6 +224,8 @@ elif [ "$mod" = "be2iscsi" ] ; then
-     mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME)
- elif [ "$mod" = "qla4xxx" ] ; then
-     mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME)
-+elif [ "$mod" = "qede" -o "$mod" = "qedi" ] ; then
-+    mac=$(iscsi_macaddress_from_pcifn $pcipath $IFNAME)
- fi
- 
- if [ -z "$mac" ] ; then

Reply via email to