Skip to content

require only ipv4 or ipv6 success for sendQuery success #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbver
Copy link

@mbver mbver commented Aug 22, 2024

serf's TestCommandRun_mDNS on my macOS M1 fails because sendQuery fails due to:

    _, err = c.ipv6UnicastConn.WriteToUDP(buf, ipv6Addr)

this will fail because the ipv6 multicast connection doesn't bind to a specific interface.

	ipv6List, _ := net.ListenMulticastUDP("udp6", config.Iface, ipv6Addr)

in this case config.Iface is nil.

however, this is successful

	_, err = c.ipv4UnicastConn.WriteToUDP(buf, ipv4Addr)

even though ipv4List is created with nil iface. multicast works for ipv4 at lo0 interface and it doesn't require specific interface binding.
sendQuery should be considered success with just one successful send. if it is successful on ipv4 but unsuccessful on ipv6, it's ok to proceed. if it is unsuccessful on ipv4 but successful on ipv6? that's unlikely, but still ok to proceed.

@mbver mbver requested a review from a team as a code owner August 22, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant