On Mon, Aug 24, 2015 at 10:26:02AM -0700, Andy Grover wrote: > Based on hch's suggestion, move away from storing textual > representations of IP and port in favor of storing struct > sockaddr_storage, which can then be printed as needed using %pISc or > %pISpc prink formats. > > The first patch fixes the double-brackets issue, I tested it > separately and recommend @stable. > > The following patches replace other spots in a similar manner, and > then switch all usage of __kernel_sockaddr_storage to the shorter > equivalent, sockaddr_storage. Since my IN6ADDR_ANY patch caused some of this mess in the first place, I took the time to test as many configurations as I could think of with this patch set. It all looks good. target portal discovery address SendTargets response INADDR_ANY v4 v4 v4 v4 v4 IN6ADDR_ANY v4 v4 IN6ADDR_ANY v6 v6 v6 v6 v6 About the only thing I could come up with (and this isn't changed by this patch set) is manually specifying a non-IN6ADDR_ANY v4-mapped-on-v6 address for the target portal. Because the v4 format override only happens for IN6ADDR_ANY portals, there is a way to respond to a v4 connection with a v6 address. target portal discovery address SendTargets response [::ffff:c0a8:7a7d] 192.168.122.125 [::ffff:192.168.122.125] But this is such a strange case, intentionally specifying a IPv6 address for IPv4 connectivity, that I don't know if it even makes sense to worry about. Reviewed-by: Chris Leech <cleech@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html