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

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Thu May 12 12:22:19 CEST 2011


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?


> 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.

If the latest version can't work with the previous configuration, then
it's a regression. We need to fix that.


> 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.

Well, my company have enough money to get new IPv4 addresses in
several ways even if ARIN can't allocate IPV4 addresses. :)

Seriously, I don't think we can make IPv6 mandatory ever.


Please fix the issue in a different way.


Thanks,
--
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



More information about the stgt mailing list