Skip to content
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

MacOS socket with MDNS group membership added is unable to receive MDNS multicast packets #35

Closed
amydevs opened this issue Oct 19, 2023 · 5 comments
Labels
bug Something isn't working stale

Comments

@amydevs
Copy link

amydevs commented Oct 19, 2023

Analysis

The sockets on MacOS bound by Ciao not able to receive incoming multicast packets despite having addMembership called. Despite this, these sockets are still able to receive the multicast packets sent on the same interface with IP_MULTICAST_LOOP enabled.

This behavior is not exhibited with Linux hosts.

The MacOS system dns-sd command is able to find registered services from Ciao. This means that the only explanation that Avahi stack on a separate Linux host not finding the Ciao registered service is that the the socket.addMembership is silently failing, or that are passing it incorrect parameters on MacOS specifically.

Expected Behavior

Incoming multicast packets should be correctly received by the the multicast sockets bound by MDNS.

Steps To Reproduce

  1. Run the following example code on a MacOS Host
import ciao, { Protocol } from './src';

const responder = ciao.getResponder();

// create a service defining a web server running on port 3000
responder.createService({
    name: 'My Web Server',
    type: 'http',
    port: 3000, // optional, can also be set via updatePort() before advertising
    txt: { // optional
      key: "value",
    }
})

// it must not be advertised, so that a query packet sent by Avahi on another host must be sent to trigger a response packet by Ciao
  1. Run avahi-browse -d local _http._tcp --resolve -t on a separate Linux host.
  2. Expect enp0s31f6 IPv4 My Web Server _http._tcp local to be an entry.

Logs

No logs emitted from Ciao or Avahi.

Configuration

No Configuration.

Environment

MacOS Host: Macmini9,1

  • OS: MacOS 13.1 (Build 22C65)
  • Software: Ciao v1.1.7
  • Node: v20.5.1
  • npm: 9.8.0

Process Supervisor

not applicable

Additional Context

I was developing my own JS MDNS responder when I came across this behavior. I've written an issue about it here:

MatrixAI/js-mdns#29

@amydevs amydevs added the bug Something isn't working label Oct 19, 2023
@Bartel-C8
Copy link

Which ethernet dongle are you using?

Can you try if it's fixed when you start Wireshark on that interface in promiscuous mode?
I have similar problems (with other multicast traffic) with an AX88178A dongle...

Copy link

github-actions bot commented Dec 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 8, 2023
@Bartel-C8
Copy link

If it's an AX88179A based dongle (you can find this info in the System Info, under the Apple logo), ping me.
I contacted ASIX for this, and they have an updated FW for the dongles, which fixes my multicast issue on macOS!

@github-actions github-actions bot removed the stale label Dec 9, 2023
Copy link

github-actions bot commented Jan 8, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 8, 2024
Copy link

This issue has been closed as no further activity has occurred.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants