[avahi] Special chars in avahi-set-hostname

Lennart Poettering lennart at poettering.net
Mon Jul 11 13:36:27 PDT 2011


On Mon, 04.07.11 16:55, Rajesh Sai T (tsairajesh at gmail.com) wrote:

> Hi,
> 
> In my sample code, I was trying to set hostname for avahi using
> "avahi_client_set_hostname()" and tried passing name as "@rajesh". But I see
> avahi-daemon set its name as "\064rajesh" replacing "@" with its ASCII
> value. Is this limitation of avahi?? or do we have any other way to see the
> same name reflected with "@" set to my daemon.
> 
> And I also tried setting my system IP address as hostname. Ex : "127.0.0.1"
> and avahi returns me error saying "Invalid host name". Do we have any such
> limitation in avahi to use a given pattern of host names?

DNS makes a number of restrictions on hostnames, and we apply them too,
though we are even more strict about it than DNS is.

Setting 127.0.0.1 as hostname is very confusing since it is actually an
IP address and many programs try parsing host specifications as ip
adddresses before they try to resolve them.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the avahi mailing list