[stgt] New portal feature breaks systems without IPv6 in kernel

ronnie sahlberg ronniesahlberg at gmail.com
Wed May 11 09:06:35 CEST 2011


Tomo, list, igor

Please find attached a patch that allows tgtd to start even if it can
not bind to the default IPv6 wildcard.

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.



Note that even on those systrems that lack IPv6 support, tgtd can be
used and start, just that it must be started with deliberate
non-support for IPv6 by ONLY specifying an IPv4 portal,   example

tgtd --iscsi portal=0.0.0.0:3260

This allows tgtd to run on those systems that are non-IPv6 aware even
without this patch.


Since being from AsiaPac, where ARIN did run out of IPv4 addresses a
while back,  I dont know if I want this patch applied.
My portal stuff did cause a regression, but on the other hand I see
good reason too why forcing IPv4 users to become aware.
And they can use a manual override, like specifying IPv4 portal
manually on the command line.


Tomo, use your judgement. The patch is applied, to fix a regression. I
can easily see reasons both why to apply it and also why not to apply
it.


I think it is about time that all software became IPv6 mandatory by
default,  so maybe this bug I introduced was subconciously deliberate.
:-)



regards
ronnie sahlberg


On Wed, May 11, 2011 at 7:30 AM, ronnie sahlberg
<ronniesahlberg at gmail.com> wrote:
> My bad.
>
> Ill provide a patch later today.
>
>
> regards
> ronnie sahlberg
>
>
> On Tue, May 10, 2011 at 10:34 PM, Novgorodov Igor <igor at novg.net> wrote:
>> I have a gentoo server working as a target, and latest 1.0.16 / GIT tgtd
>> gives me "No available low level driver",
>> while 1.0.15 works fine. After some tracing i've found out that by default
>> it creates "0::0" ipv6 portal along with
>> default 0.0.0.0, and when it fails to bind to v6 socket, it dies.
>>
>> So, for now i've just removed the v6 wildcard portal, but we should have
>> some checks that the current kernel
>> actually was built with ipv6 before attempting to try it...
>>
>>  # diff -c iscsi_tcp.c.orig iscsi_tcp.c
>> *** iscsi_tcp.c.orig    Tue May 10 16:21:39 2011
>> --- iscsi_tcp.c Tue May 10 16:21:43 2011
>> ***************
>> *** 306,312 ****
>>           for ipv4 and ipv6
>>        */
>>        if (list_empty(&iscsi_portals_list)) {
>> !               iscsi_add_portal("0::0", 0, 1, 0);
>>                iscsi_add_portal("0.0.0.0", 0, 1, 0);
>>        }
>>
>> --- 306,312 ----
>>           for ipv4 and ipv6
>>        */
>>        if (list_empty(&iscsi_portals_list)) {
>> ! //            iscsi_add_portal("0::0", 0, 1, 0);
>>                iscsi_add_portal("0.0.0.0", 0, 1, 0);
>>        }
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe stgt" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-TGTD-to-start-even-if-it-can-not-bind-to-IPv6-.patch
Type: text/x-diff
Size: 1277 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20110511/1d50d808/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-TGTD-to-start-even-if-it-can-not-bind-to-IPv6-.patch.gz
Type: application/x-gzip
Size: 699 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20110511/1d50d808/attachment-0002.bin>


More information about the stgt mailing list