[avahi] Strange MDNS response from Axis cameras

Lennart Poettering lennart at poettering.net
Wed Feb 15 07:40:18 PST 2006


On Fri, 10.02.06 12:11, Sebastien Estienne (sebastien.estienne at gmail.com) wrote:

> Or we could return all the detected IP (in one way or another) and of
> a new function in our Api that would check if the ip is "reachable" or
> not.

I dont think this should be an API exported to the user. I don't like
to complicate oru API even further. It's already a little too
complicated for my taste.

> Now how to return more than one address (hopefully without modifying
> the current api)?
> Maybe we could emit one more callback per IP found? (I don't know yet
> if we could modify AvahiAddress to be able to handle more than one
> adress without breaking the Api compatibility.)

If you need all addresses assigned to a host name just use an
AvahiRecordBrowser object and look for A or AAAA records - that's
simple enough.

Avahi distuinguishes between "resolvers" and "browsers". Resolvers
look for the first RR that matches the query and they time out after
5s if nothing is found.  In contrast to browsers, which look for all
RRs of a certain type and which never time out.

Modifying host name resolvers to return more than one address would
break the current semantics. Why? Because you'd always have to wait
for the timeout to elapse, because many mDNS implementations just
register A xor AAAA records. (most notably Apple's mDNSResponder) To
compile a list of all A and AAAA addresses you'd need to wait for the
responses to the A and for the responses to the AAAA query. But the
latter will probably timeout when the registering mDNS implementation
is mDNSResponder. I think it is not acceptable to have to wait 5s
whenever you try to resolve a hostname with avahi, right?

To simplify writing Avahi client apps it is probably best to abstract
all that multiple address RR stuff from the programmer and simply
decide for him which address to use.

> And this behaviour could be control with AvahiLookupFlags when calling
> avahi_s_service_resolver_new.
> We could decide:
> - return only the first adress found
> - return only linklocal address
> - return all address found

The other mail I sent some minutes ago includes a sensible algorithmm
to deal with this situation. I'll implement it when I find the time
to.

> > I think this approach is simpler, but I don't know if it can be easily done,
> > or secure enough.
> >
> 
> I'm not sure that doing this is the job of the avahi daemon, in my
> opinion it should be handled by the network scripts of the linux
> distribution.

I second that. The distro should install Anand's "zeroconf" package
and everything should be fine.

Lennart

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


More information about the avahi mailing list