Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected], [email protected]
Control: affects -1 + src:open-iscsi
User: [email protected]
Usertags: pu

[ Reason ]
Fixes a regression in upstream code that affects bookworm->trixie upgrades.

[ Impact ]
The regression remains unfixed, and systems using 'static' type discovery
break.

[ Tests ]
The fix has been reviewed and applied upstream, and manually verified.

[ Risks ]
The fix is trivial.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Cherry pick of a single commit that makes an enum that was accidentally broken
backwards compatible again.
diff -Nru open-iscsi-2.1.11/debian/changelog open-iscsi-2.1.11/debian/changelog
--- open-iscsi-2.1.11/debian/changelog  2025-08-15 23:26:38.000000000 +0200
+++ open-iscsi-2.1.11/debian/changelog  2026-03-05 10:57:10.000000000 +0100
@@ -1,3 +1,10 @@
+open-iscsi (2.1.11-1+deb13u2) trixie; urgency=medium
+
+  * Team upload.
+  * [c3164f2] cherry-pick fix for discovering 'static' nodes (Closes: #1129063)
+
+ -- Fabian Grünbichler <[email protected]>  Thu, 05 Mar 2026 
10:57:10 +0100
+
 open-iscsi (2.1.11-1+deb13u1) trixie; urgency=medium
 
   * [f3d17cf] initramfs: ensure that /var/lib exists.
diff -Nru 
open-iscsi-2.1.11/debian/patches/Fix-incorrect-parsing-of-node.discovery_type-static-and-f.patch
 
open-iscsi-2.1.11/debian/patches/Fix-incorrect-parsing-of-node.discovery_type-static-and-f.patch
--- 
open-iscsi-2.1.11/debian/patches/Fix-incorrect-parsing-of-node.discovery_type-static-and-f.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
open-iscsi-2.1.11/debian/patches/Fix-incorrect-parsing-of-node.discovery_type-static-and-f.patch
    2026-03-05 10:56:45.000000000 +0100
@@ -0,0 +1,64 @@
+From: Mike Andrews <[email protected]>
+Date: Sun, 28 Dec 2025 19:19:39 -0500
+Subject: Fix incorrect parsing of node.discovery_type "static" and "fw"
+ (#518)
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Remove the unused DISCOVERY_TYPE_SLP enumeration value so that the strings
+"static" and "fw" map to the correct enum values.
+
+Previous versions supported an "slp" discovery_type.  In d1d456cf28cd89, the
+"slp" string was removed from the list of TYPE_INT_O string arguments when
+processing DISC_TYPE and NODE_DISC_TYPE records in idbm_recinfo_discovery and
+_idbm_node_rec_link.  But, it was left in the discovery_type enum.  The
+resulting parsing logic would then map the string values "static" and "fw" to
+the wrong enum values, and thus logic with unique action on
+DISCOVERY_TYPE_STATIC and DISCOVERY_TYPE_FW did the wrong thing.  Specifically,
+
+- "static" mapped to DISCOVERY_TYPE_SLP, and
+- "fw" mapped to DISCOVERY_TYPE_STATIC.
+
+One manifestation of this bug is that you can no longer use iscsiadm to
+manipulate or delete nodes with discovery_type = "static", as it falls through
+to the default case in setup_disc_to_node_link.
+
+Fixes #463.
+
+(cherry picked from commit 290d16d6c6b6f4c78af119eb874484b2f995dc23)
+
+Forwarded: not-needed
+Closes: #1129063
+Signed-off-by: Fabian Grünbichler <[email protected]>
+---
+ libopeniscsiusr/idbm.h | 2 --
+ usr/config.h           | 2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/libopeniscsiusr/idbm.h b/libopeniscsiusr/idbm.h
+index b96a082..13ce4be 100644
+--- a/libopeniscsiusr/idbm.h
++++ b/libopeniscsiusr/idbm.h
+@@ -78,8 +78,6 @@ enum discovery_type {
+       DISCOVERY_TYPE_SENDTARGETS,
+       DISCOVERY_TYPE_ISNS,
+       DISCOVERY_TYPE_OFFLOAD_SENDTARGETS,
+-      /* SLP is Not Used --  kept as place holder */
+-      DISCOVERY_TYPE_SLP_NOT_IMPLEMENTED,
+       DISCOVERY_TYPE_STATIC,
+       DISCOVERY_TYPE_FW,
+ };
+diff --git a/usr/config.h b/usr/config.h
+index 716e343..d624d76 100644
+--- a/usr/config.h
++++ b/usr/config.h
+@@ -161,8 +161,6 @@ typedef enum discovery_type {
+       DISCOVERY_TYPE_SENDTARGETS,
+       DISCOVERY_TYPE_ISNS,
+       DISCOVERY_TYPE_OFFLOAD_SENDTARGETS,
+-      /* SLP is Not Used --  kept as place holder */
+-      DISCOVERY_TYPE_SLP_NOT_IMPLEMENTED,
+       DISCOVERY_TYPE_STATIC,
+       DISCOVERY_TYPE_FW,
+ } discovery_type_e;
diff -Nru open-iscsi-2.1.11/debian/patches/series 
open-iscsi-2.1.11/debian/patches/series
--- open-iscsi-2.1.11/debian/patches/series     2025-08-15 23:26:38.000000000 
+0200
+++ open-iscsi-2.1.11/debian/patches/series     2026-03-05 10:56:45.000000000 
+0100
@@ -1,2 +1,3 @@
 debian/lp1755858-default-iscsid_conf-to-iscsid_socket.patch
 build-disable-Wno-all.patch
+Fix-incorrect-parsing-of-node.discovery_type-static-and-f.patch

Reply via email to