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: test udp_multicast_join fails on macOS 13 and above #4263
Comments
It's probably a firewall issue (common issue with the multicast tests) but that -8 error code is kind of odd, that's ENOEXEC. |
I could work on this. |
You're welcome to. Do you know what the root cause is? |
No yet... I'm investigating |
I think I found the problem, but I'm not sure why is happening: diff --git a/src/unix/udp.c b/src/unix/udp.c
index c2814512..29742136 100644
--- a/src/unix/udp.c
+++ b/src/unix/udp.c
@@ -811,7 +811,7 @@ static int uv__udp_set_membership4(uv_udp_t* handle,
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
}
- mreq.imr_multiaddr.s_addr = multicast_addr->sin_addr.s_addr;
+ mreq.imr_multiaddr.s_addr = inet_addr("239.255.255.250");
switch (membership) {
case UV_JOIN_GROUP:
That diff will make the Maybe the problem is in Line 1060 in 7b9e37c
multicast_addr struct.
Any hints? Or ideas? |
The test tries to join the multicast group with address 239.255.0.1. My best guess is that address is completely blocked off, whereas 239.255.255.250 is available(ish) but not able to send or receive datagrams. See if starts working when you disable the macos firewall completely. |
I have my firewall disabled, It has been disabled this whole time |
Ah, okay. I don't have a good hypothesis then. Do local subnet addresses (224.0.0.x) work? |
Ok, this is really weird; I'm using the next Node.js UDP server const dgram = require('dgram');
const MULTICAST_ADDR = '224.0.0.4';
const PORT = 1234;
const socket = dgram.createSocket({ type: 'udp4', reuseAddr: true });
socket.on('error', (err) => {
console.error(`Socket error: ${err}`);
socket.close();
});
socket.on('listening', () => {
console.log(`Socket listening on ${socket.address().address}:${socket.address().port}`);
});
socket.on('message', (msg, rinfo) => {
console.log(`Received message from ${rinfo.address}:${rinfo.port}: ${msg}`);
});
socket.bind(PORT, () => {
socket.addMembership(MULTICAST_ADDR);
console.log(`Joined multicast group ${MULTICAST_ADDR}`);
}); If I run that, and change the test to use that address, the test passes, normally. Now, If I kill that server and try to run that server again, I get the same |
Fixes: libuv#4263 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Fixes: libuv#4263 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
It is a firewall issue. |
Fails with:
Failure happens on udp_set_membership / setsockopt call.
For reference, see: https://github.com/libuv/libuv/actions/runs/7277757514/job/19830481286#step:5:508
The text was updated successfully, but these errors were encountered: