[avahi] Resolve multiple IP4 Addresses

Mark Gollahon mgollahon at exacq.com
Thu May 7 10:09:46 PDT 2009

On Thu, 7 May 2009 15:00:33 +0200, Lennart Poettering wrote:

> On Thu, 07.05.09 09:14, Daniel Wynne (daniel.wynne at mobotix.com) wrote:
>> Please excuse my nescience, but Im pretty new to this.
>> Or it might be, that I am completely wrong. In this case you should
>> blame my childish naivety ;-)
>And again, if you feel you need to use this it is very likely that you
>are misusing mDNS and make assumptions you shouldn't make or try to
>use mDNS for purposes it was not designed for.

I have to respectfully disagree with you, Lennart.  In at least one
case, having all reported addresses is vital and not against what mDNS
was designed for.  Because Avahi will report only one address, we've had
to stick with Bonjour as our mDNS resolver.

In my case, we are connecting to Axis cameras.  Some models of Axis
cameras report their configured IP address first; others report their
link-local address first.  Now, because of certain other design
limitations and requirements that would take too much time to go into
here, we have to store the camera's IP address when that camera is
configured in our system.  So, if during our camera detection phase,
Avahi hands back the link-local address, then we're totally sunk when
the link-local address changes (which does at the most inopportune time
- when the camera reboots and we're trying to reconnect).

Furthermore, trying to explain what that "169.x.x.x" address is or why a
user doesn't see the address they configured into the camera to a user
not versed in IP addressing is a complete non-starter.

Therefore, saying that scenarios where an mDNS recipient needs all
addresses for a given DNS name is a misuse of mDNS really is
disingenuous.  There really are times when we need all of the reported
addresses we can get.

Mark Gollahon

More information about the avahi mailing list