chaos / diod

Distributed I/O Daemon - a 9P file server
GNU General Public License v2.0
349 stars 56 forks source link

IPv6 IPs in server:/path specifications / use of URIs #15

Open pipcet opened 9 years ago

pipcet commented 9 years ago

Hi, diod appears to work fine with IPv6, but diodmount doesn't when an IPv6 IP is used instead of a hostname; IPv6 IPs contain colons, and we split on the first rather than the last colon character to separate hostname/aname or hostname/port.

That's trivial to "fix" by splitting on the last colon (https://github.com/chaos/diod/compare/master...pipcet:last-colon), but of course that will fail in the hypothetical case of an aname that includes a colon itself.

However, I do wonder why we're not using URLs? We have an official IANA-assigned port number, so that sounds like a pretty good basis for requesting an URI scheme. (However, the first character of an URI scheme must not be a digit, so we'd have to choose something different from 9pfs://)

garlick commented 9 years ago

Adopting a URI scheme for 9p paths sounds like a good change. I'm thinking however that we'd need to support the old format too to avoid breaking scripts, fstabs, etc..

I'd suggest fixing ipv6 in one PR and (perhaps later when one of us has time) trying out URI's in another PR. Isn't there some mechanism for registering a URI prefix though? We may want to bring the idea up on v9fs-discuss and see what people think of it first.

Please remember to test changes with make check if you aren't already doing that, both as user and as root. (There are some spurious failures that need to be run down but please at least make sure new ones aren't added). Thanks.