From e67e25297082fcd5e1ba36c7707e9721739b0563 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Tue, 7 Jun 2022 20:54:02 +0200 Subject: [PATCH 1/3] Fix compatibility with avahi 0.8-rc1 This fixes browse, lookup and also register not working properly with devices running with avahi 0.8-rc1 --- connection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connection.go b/connection.go index 598dbb99..5428526b 100644 --- a/connection.go +++ b/connection.go @@ -93,6 +93,8 @@ func joinUdp4Multicast(interfaces []net.Interface) (*ipv4.PacketConn, error) { return nil, fmt.Errorf("udp4: failed to join any of these interfaces: %v", interfaces) } + pkConn.SetMulticastTTL(255) + return pkConn, nil } From 4c9557651bc973ded9291db300ae0048259e9422 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Tue, 7 Jun 2022 21:55:15 +0200 Subject: [PATCH 2/3] Fix linter warning --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index 5428526b..196524c0 100644 --- a/connection.go +++ b/connection.go @@ -93,7 +93,7 @@ func joinUdp4Multicast(interfaces []net.Interface) (*ipv4.PacketConn, error) { return nil, fmt.Errorf("udp4: failed to join any of these interfaces: %v", interfaces) } - pkConn.SetMulticastTTL(255) + _ = pkConn.SetMulticastTTL(255) return pkConn, nil } From 7e99293722e3934009bc389e95752c87a984e1d0 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Thu, 23 Jun 2022 11:15:20 +0200 Subject: [PATCH 3/3] Also set IPv6 HopLimit --- connection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connection.go b/connection.go index 196524c0..a0936d9e 100644 --- a/connection.go +++ b/connection.go @@ -62,6 +62,8 @@ func joinUdp6Multicast(interfaces []net.Interface) (*ipv6.PacketConn, error) { return nil, fmt.Errorf("udp6: failed to join any of these interfaces: %v", interfaces) } + _ = pkConn.SetMulticastHopLimit(255) + return pkConn, nil }