You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iiod: Make sure network is alive before poking avahi
In the past, we were only checking hostname, as a way to see if the
network was ready, but unfortunately - that doesn't work. The kernel
really only needs to have a hostname set for uname() to work, which is
what glibc and uclibc implement in gethostname().
So - now we check there is a working, configured ethernet card,
that supports mdns (ie. multicast) that is up before moving on to making
sure there is a hostname.
We also don't allow "none" or "(none)" to be the hostname until after
things time out (3 min).
This fixes#1072 and turns:
192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17
into:
192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16
and when you have multiple on network (with same name):
192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16
192.168.1.110:5353 : answer pluto.local. A 192.168.1.110
192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19
192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115
Signed-off-by: Robin Getz <[email protected]>
[pcercuei: change %d to %ld in print format string]
Signed-off-by: Paul Cercueil <[email protected]>
(cherry picked from commit 38483f3)
0 commit comments