[stgt] New portal feature breaks systems without IPv6 in kernel
ronnie sahlberg
ronniesahlberg at gmail.com
Mon May 23 10:13:32 CEST 2011
Tomo, List
Please find attached a new patch that fixes the breakage for non-ipv6
enabled hosts.
On Sat, May 21, 2011 at 2:47 AM, FUJITA Tomonori
<fujita.tomonori at lab.ntt.co.jp> wrote:
> On Fri, 13 May 2011 19:36:04 +1000
> ronnie sahlberg <ronniesahlberg at gmail.com> wrote:
>
>> On Thu, May 12, 2011 at 8:22 PM, FUJITA Tomonori
>> <fujita.tomonori at lab.ntt.co.jp> wrote:
>>> On Wed, 11 May 2011 17:06:35 +1000
>>> ronnie sahlberg <ronniesahlberg at gmail.com> wrote:
>>>
>>>> By default, if no portal is specified, tgtd will try to bind to both
>>>> IPv6 and IPv4 wildcard.
>>>> This caused the start to fail with an error on systems with no IPv6 available.
>>>
>>> The root problem is that the current code assumes network
>>> configurations in the following way:
>>>
>>> if (list_empty(&iscsi_portals_list)) {
>>> iscsi_add_portal("0::0", 0, 1, 0);
>>> iscsi_add_portal("0.0.0.0", 0, 1, 0);
>>> }
>>>
>>> Which is exactly what network programing text books tell us not to do,
>>> I think.
>>>
>>> What we should do here is asking a system about available network
>>> addresses by passing NULL to getaddrinfo() like the old code did.
>>>
>>> I think that we should move the portal allocation code in
>>> iscsi_add_portal() to iscsi_tcp_init_potal(). iscsi_tcp_init_potal()
>>> takes addr and port, then creates iscsi_portal struct.
>>>
>>> Can you fix this in such way?
>>>
>>
>> I can and I will
>> patch eta tomorrow
>
> Ping? Let me know if you are busy about other stuff. I could fix it.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-the-brekage-in-the-portal-handling-so-it-is-agai.patch.gz
Type: application/x-gzip
Size: 2176 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20110523/d8120749/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-the-brekage-in-the-portal-handling-so-it-is-agai.patch
Type: text/x-diff
Size: 6615 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20110523/d8120749/attachment-0002.patch>
More information about the stgt
mailing list