Bug 500102 - iscsi initiator doesn't login to IPv6 address
iscsi initiator doesn't login to IPv6 address
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: iscsi-initiator-utils (Show other bugs)
5.3
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Mike Christie
Red Hat Kernel QE team
: ZStream
Depends On:
Blocks: 501737
  Show dependency treegraph
 
Reported: 2009-05-11 01:03 EDT by Mark Goodwin
Modified: 2010-10-23 05:30 EDT (History)
10 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:30:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Goodwin 2009-05-11 01:03:27 EDT
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 10:59:48 EDT
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 11:02:35 EDT
Oh yeah Mark, Do you have a ipv6 setup in Red Hat somewhere?
Comment 12 michal novacek 2009-06-05 06:35:43 EDT
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 08:01:25 EDT
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 07:30:54 EDT
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.