Created attachment 15824 [details] tiny test app The standardized way to express non-legacy IP addresses is putting them in square brackets. e.g. smb://[::1]/ would be localhost libsmbclient doesn't properly support this, yet does know how to handle non-legacy IP addresses. See the attached example app. It's trying to stat smb://[::1]/foo but gets EINVAL back. I've added a whole bunch of permutations and the only one that actually will parse correctly is smb://::1/foo with the colons percent encoded (i.e. smb://%3A%3A1/foo). That is of course not standard conform and needs a workaround in every application built on top of libsmbc. Not ideal. At a glance the parsing primarily stumbles over the very opinionated colon check in libsmb_path.c. If that colon check got extended to skip over colons inside square brackets and then afterwards strip the square brackets pp_server would end up being '::1' which then should work as expected. GVFS has a workaround for this: https://bugzilla.gnome.org/show_bug.cgi?id=604116 And I guess KIO will also need one: https://bugs.kde.org/show_bug.cgi?id=417682 It'd be grand if nothing needed a workaround ;)
The already working solution is the usage of the "ipv6-literal.net" domain, e.g. fd00-0000-0000-0000-0000-0000-5357-5f03.ipv6-literal.net. See also https://social.technet.microsoft.com/Forums/windowsserver/en-US/d61f8efe-c9a7-4fd7-a7e9-f936c2154c54/net-command-with-ipv6-address
closing as WONTFIX, because ipv6-literal.net is the way to go and this is subject of an nss module, for example nss_resolve from systemd. The [::1] notation is asking for trouble at many places. With SMB you should anyway prefer to use resolvable host names, so that for example krb5 works properly.