Bug 1206868

Summary: targetcli presents improperly formatted ipv6 addresses over the wire
Product: Red Hat Enterprise Linux 7 Reporter: Kyle Brantley <kyle>
Component: kernelAssignee: Andy Grover <agrover>
kernel sub component: Kernel Target (LIO) QA Contact: Bruno Goncalves <bgoncalv>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: unspecified CC: bgoncalv, cleech, riehecky
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-21 16:00:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1136558    
Bug Blocks:    
Attachments:
Description Flags
screenshot of the MS iscsi initiator displaying the portal information none

Description Kyle Brantley 2015-03-29 04:25:20 UTC
Created attachment 1007903 [details]
screenshot of the MS iscsi initiator displaying the portal information

(or, at a minimum, "addresses are being formatted in a way not properly interpreted by the stock windows iscsi client". Additionally, I'm not sure if the appropriate component is targetcli or kernel.)

Description of problem:

Once an IPv6 addresses is added to a portal, it's presented over the network without the appropriate square braces surrounding the address. This causes a fair bit of confusion within the windows iSCSI client, and results in being unable to connect to the target.


Version-Release number of selected component (if applicable):
kernel-3.10.0-123.20.1.el7.x86_64
targetcli-2.1.fb34-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Add a new IPv6 portal to an iSCSI target.
2. Attempt to connect to the target via the stock windows iSCSI initiator.

Actual results:
The address is parsed improperly due to address encoding ambiguity, and no connection can be established.

Expected results:
iSCSI connectivity.

Additional info:
Over the wire, the TargetAddress is being sent with a value of: 2001:470:0:0:0:0:0:1:3260,1
Note the lack of square braces around the address. This causes confusion within the MS iSCSI client, which accepts '2001' as the hostname or IP address, and '470' as the port number.

To remove this ambiguity, the TargetAddress likely should be sent across the wire with a value of: [2001:470:0:0:0:0:0:1]:3260,1

Comment 2 Kyle Brantley 2015-03-29 20:33:51 UTC
Simple case guaranteeing ambiguity:

/iscsi/iqn.20.../tpg1/portals> create ip_address=2001:470::1
Using default IP port 3260
Created network portal 2001:470::1:3260.

Over the wire, this is sent as "2001:470::1:3260" -- which could be interpreted as an IP address of 2001:470::1 and port 3260, or as IP address 2001:470::1:3260 without a port number.

Comment 3 Andy Grover 2015-03-31 22:07:28 UTC
fix created and posted upstream

Comment 4 Andy Grover 2015-04-01 19:36:31 UTC
fix accepted. We'll pull this in in the lio rebase for 7.2, see bug 1136558.

Comment 5 Andy Grover 2015-07-21 16:00:33 UTC

*** This bug has been marked as a duplicate of bug 1136558 ***