On Mar 31, 2006, at 3:50 PM, Lennart Poettering wrote:

On Tue, 21.03.06 17:31, Iván Sánchez Ortega ([EMAIL PROTECTED]) wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I just discovered that the Avahi daemon dies if one machine in the network
handles out a response with a strange host (or domain) name.

I'm attaching the ethereal capture of the packet that "kills" the avahi
daemon, but this is how I can reproduce this:

- - Buy an Axis IP camera
- - Change the camera hostname by issuing the following command:
wget
http://{camera_ip_address}/axis-cgi/admin/param.cgi? action=update&Network.Bonjour.FriendlyName=fóobar
(notice the acute in the 'ó')
- - Run avahi-browse -at
- - Watch how the avahi daemon dies.

I guess that setting up any other kind of mDNS responder (an avahi daemon, a Bonjour-enabled Mac, etc) to return a hostname with "strange" characters (anything not in 7-bit ASCII, I guess, like in "fóobar") may be able to
reproduce this bug. By the way, I'm running Avahi 0.6.9 here.


Hmm. While Avahi shouldn't die when such a host name appears on the
network it's primarily a bug in the axis cameras. They shouldn't send
hostnames with invalid UTF-8 characters in the first place. 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 think i will simply write a message to syslog and ignore the RRs
which contains such bogus host names. What do you think?

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.

-Marc

_______________________________________________
avahi mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/avahi

Reply via email to