From 92f518deac02672e596e9437a510d11369edb3ec Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Sun, 1 Dec 2024 09:39:42 +0100 Subject: [PATCH] Use only IPv4 for discovery. IPv6 discovery e.g. does not work from containers. (#201) --- dns/dns.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dns/dns.go b/dns/dns.go index 275f09a..98ea517 100644 --- a/dns/dns.go +++ b/dns/dns.go @@ -79,7 +79,9 @@ func DiscoverCastDNSEntryByName(ctx context.Context, iface *net.Interface, name // DiscoverCastDNSEntries will return a channel with any cast dns entries // found. func DiscoverCastDNSEntries(ctx context.Context, iface *net.Interface) (<-chan CastEntry, error) { - var opts = []zeroconf.ClientOption{} + var opts = []zeroconf.ClientOption{ + zeroconf.SelectIPTraffic(zeroconf.IPv4), + } if iface != nil { opts = append(opts, zeroconf.SelectIfaces([]net.Interface{*iface})) }