[avahi] Avahi daemon dies on certain hostnames

Lennart Poettering lennart at poettering.net
Sat Apr 1 04:38:57 PST 2006


On Sat, 01.04.06 13:29, Iván Sánchez Ortega (i.sanchez at mirame.net) wrote:

> > However, I don't know what to do in such a case. Ignore the hostanem 
> > entirely because it isn't valid UTF-8? Treat is as ISO8859-1 if it doesn't
> > validate as UTF8?
> 
> I suggest that Avahi should have the same behaviour as Apple's Bonjour. 
> Convert the non-valid characters to whitespaces (or other glyph, such an 
> underscore), but never discard a host because the mDNS hostname is invalid. I 
> mostly agree with Ross Burton at this point.

My ISO8859-1 idea doesn't make a lot of sense actually, due to the
bijectiveness issues i pointed out in that response to Ross' mail.

For the same reasons the solution you suggest here isn't going to
work.

> El Sábado 01 de Abril de 2006 02:29, Marc Krochmal escribió:
> > Couldn't you just allow the UTF-8 hostname but log a warning
> > message?  UTF-8 is a valid encoding scheme for mDNS in general, just
> > in practice, hostnames are traditionally restricted to letter,
> > digits, hyphens so as to make them easy to type into command-line
> > interfaces.
> 
> As RFC 2181, chapter 11 points out, a DNS server can return just any binary 
> string, and the DNS client (avahi-daemon, in our case) is responsible for 
> validating the data.

AFAIK the restriction to letter, digits, hyphens is imposed by the
registrars not DNS specs itself.

> IMHO, Avahi cannot restrict itself to "traditional" hostnames 
> (non-case-sensitive, only a-z, 0-9, hyphen and underscore): there are lots of 
> bonjour-enabled devces out there that have blank spaces in their mDNS 
> hostnames. There are even *examples* of Bonjour using names with spaces.


BTW, Marc: What is the the way Apple suggests to handle the issues of
i18n domains on unicast DNS? Transform each label that contains
non-ascii characters to punycode? This would result in an algorithm
like this:

1. if the name validates as ascii, encode it as is
2. if the name validates as utf8 and destination port is 53, encode it
   as punycode
3. if the name validates as utf and destination port is 5353, encode
   it as is
4. else, cry and log about it to syslog

Lennart


-- 
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/


More information about the avahi mailing list