Skip to content

Commit

Permalink
Merge pull request #108 from DerAndereAndi/bugfix/avahi-0.8
Browse files Browse the repository at this point in the history
Fix compatibility with some IoT devices using avahi 0.8-rc1
  • Loading branch information
grandcat authored Jun 23, 2022
2 parents a393c0e + 204e1b4 commit e1d6e57
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e1d6e57

Please sign in to comment.