Bug 500102 - iscsi initiator doesn't login to IPv6 address
Summary: iscsi initiator doesn't login to IPv6 address
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: iscsi-initiator-utils
Version: 5.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Mike Christie
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 501737
TreeView+ depends on / blocked
 
Reported: 2009-05-11 05:03 UTC by Mark Goodwin
Modified: 2018-10-20 02:03 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
the iSCSI protocol allows targets to redirect initiators during the login phase. Previously, the code used by the iscsi initiator to parse IPv6 addresses contained faulty logic that caused it to fail to recognise IPv6 addresses as valid when redirected. As a consequence, when operating in an IPv6 environment, the initiator could not log in to targets that use the login redirect feature, such as Dell EqualLogic targets. The initiator now parses IPv6 addresses correctly, enabling use of these targets in IPv6 environments.
Clone Of:
Environment:
Last Closed: 2009-09-02 11:30:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1368 0 normal SHIPPED_LIVE iscsi-initiator-utils bug fix update 2009-09-01 11:01:19 UTC

Description Mark Goodwin 2009-05-11 05:03:27 UTC
Description of problem:
iscsi initiator doesn't login to IPv6 address, errata fix requested.
Simple upstream patch is available to correct parser issue.

Version-Release number of selected component (if applicable):
RHEL 5.3 Kernel v2.618-128-e15.
iSCSI Initiator version 2.0.868-018.el5 (rhel-5.3 native)

Steps to Reproduce:

1) Create LUNS on Equallogic PS5000 array and allow Access to iSCSI Initators.
2) Discover iscsiadm command -  iscsiadm -m discovery -t sendtargets -p [fd00:de11:35ac:422:9ab:8cd:7ef:2230]:3260
3) View all Discovered LUNs
4) Attempt to connect to each individual LUN  (Hangs)

Actual results: iscsi login failure

Expected results: iscsi login success

Additional info: upstream fix available as follows :

8e955128f5ba7b92d8e1c023ffde3f41a5a3eb28

--------------------------------- usr/login.c ---------------------------------
index 7c004cd..0235870 100644
@@ -186,11 +186,10 @@ int
iscsi_update_address(iscsi_conn_t *conn, char *address)
{
char *port, *tag;
char default_port[NI_MAXSERV];
iscsi_session_t *session = conn->session;
-
struct sockaddr_storage addr;

if ((tag = strrchr(address, ','))) {
*tag = '\0';
tag++;
@@ -203,10 +202,22 @@ iscsi_update_address(iscsi_conn_t *conn,
if (!port) {
sprintf(default_port, "%d", ISCSI_LISTEN_PORT);
port = default_port;
}

+ if (*address == '[') {
+ char *end_bracket;
+
+ if (!(end_bracket = strchr(address, ']'))) {
+ log_error("Invalid IPv6 address with opening bracket, "
+   "but no closing bracket.");
+ return 0;
+ }
+ *end_bracket = '\0';
+ address++;
+        }
+
if (resolve_address(address, port, &addr)) {
log_error("cannot resolve host name %s", address);
return 0;
}

Comment 1 Mike Christie 2009-05-11 14:59:48 UTC
I have this in the rpm for 5.4. Try:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1793738

It is also in cvs.  I do not think it hit the nightly yet. If you see
iscsi-initiator-utils-6.2.0.871-0.0, it is fixed in there. The .1 just has some installer fix.

Comment 2 Mike Christie 2009-05-11 15:02:35 UTC
Oh yeah Mark, Do you have a ipv6 setup in Red Hat somewhere?

Comment 12 michal novacek 2009-06-05 10:35:43 UTC
Dell verified that the issue has been fixed for them.

As we cannot replicate the issue I only did the regression testing with
/kernel/storage/iscsi-target and /kernel/storage/iscsi-target-ipv6 and I tested
the ipv6 logging code using
/kernel/storage/iscsi-target-ipv6-logging-and-binding.

Comment 14 Ruediger Landmann 2009-08-26 12:01:25 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
the iSCSI protocol allows targets to redirect initiators during the login
phase. Previously, the code used by the iscsi initiator to parse IPv6
addresses contained faulty logic that caused it to fail to recognise IPv6
addresses as valid when redirected. As a consequence, when operating in an
IPv6 environment, the initiator could not log in to targets that use the 
login redirect feature, such as Dell EqualLogic targets. The initiator now
parses IPv6 addresses correctly, enabling use of these targets in IPv6
environments.

Comment 15 errata-xmlrpc 2009-09-02 11:30:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1368.html


Note You need to log in before you can comment on or make changes to this bug.