diff --git a/connection.go b/connection.go index 598dbb99..daac9c12 100644 --- a/connection.go +++ b/connection.go @@ -44,6 +44,7 @@ func joinUdp6Multicast(interfaces []net.Interface) (*ipv6.PacketConn, error) { // Join multicast groups to receive announcements pkConn := ipv6.NewPacketConn(udpConn) pkConn.SetControlMessage(ipv6.FlagInterface, true) + _ = pkConn.SetMulticastHopLimit(255) if len(interfaces) == 0 { interfaces = listMulticastInterfaces() @@ -75,6 +76,7 @@ func joinUdp4Multicast(interfaces []net.Interface) (*ipv4.PacketConn, error) { // Join multicast groups to receive announcements pkConn := ipv4.NewPacketConn(udpConn) pkConn.SetControlMessage(ipv4.FlagInterface, true) + _ = pkConn.SetMulticastTTL(255) if len(interfaces) == 0 { interfaces = listMulticastInterfaces()