On Thu, May 12, 2011 at 8:22 PM, FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote: > On Wed, 11 May 2011 17:06:35 +1000 > ronnie sahlberg <ronniesahlberg@xxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html