[avahi] Re: Avahi daemon dies on certain hostnames
Lennart Poettering
lennart at poettering.net
Sat Apr 1 06:29:16 PST 2006
On Sat, 01.04.06 15:18, Iván Sánchez Ortega (i.sanchez at mirame.net) wrote:
Hi!
> > If so, I don't see such a big problem if we simple refuse to work with badly
> > configured devices.
>
> I don't like that idea much... a "badly configured device" today may be
> a "device with default config" tomorrow.
hee. working around the bugs of tomorrow already today seems a little
strange to me. ;-)
> You say that escaping the string is not a valid solution, due to the DNS label
> size limit. But, how about this?:
>
> if (the label is not a valid UTF8 string)
> {
> escape the invalid characters
> if (new lenght of the DNS label < 255)
> Return the escaped label
> else
> Ignore this label, log a warning into syslog
> }
>
>
> This way, Avahi should work with *most* badly configured devices (as people
> don't usually use up 256 characters for a device name); and devices
> with "bad" names, that are too long to be sanitized, will be just
> ignored.
as sebest already mentioned: the limit is 63, not 255.
The scheme you suggest isn't invertible. There needs to be a way to
detect whether a sanitized string has been escaped or not.
Lennart
--
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/
More information about the avahi
mailing list