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

UDP/Datagram more low level options #22994

Closed
GummyDonut opened this issue Sep 21, 2018 · 8 comments
Closed

UDP/Datagram more low level options #22994

GummyDonut opened this issue Sep 21, 2018 · 8 comments
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. feature request Issues that request new features to be added to Node.js. wontfix Issues that will not be fixed.

Comments

@GummyDonut
Copy link

GummyDonut commented Sep 21, 2018

Is your feature request related to a problem? Please describe.
I originally posted the problem I ran into here:
#19954
However, to keep a long story short, when sockets are created by default in nodeJS they have the "IP_MULTICAST_ALL" set to on "the socket will receive messages from all the groups that have been joined globally on the whole system." - http://man7.org/linux/man-pages/man7/ip.7.html
Groups this case being multicast groups, and unfortunately for us it is undesired behaviour,
Edit: (Few hours later, I found out my multicast broadcast was disabled, and I was sending directly to the ip, which is not multicast, but the point still stands, why no level options?)

Describe the solution you'd like
Thus we would like a means to change the ipv4 protocol options (http://man7.org/linux/man-pages/man7/ip.7.html) and the options listed in setsockopt for c (http://pubs.opengroup.org/onlinepubs/009695399/functions/setsockopt.html)
from dgram/nodejs, at the moment these options are not exposed at all.

In addition is there are reason these options have not been exposes initially? For us, without the IP_MULTICAST_ALL option exposed, multicast does not behave as intende

Describe alternatives you've considered
Some of the alternatives have been discussed in this issue: #19954
For the moment we are gonna avoid nodejs and create the socket in python as the options are
exposed there https://docs.python.org/3/library/socket.html#socket-objects

@GummyDonut GummyDonut changed the title UDP/Datagram more low level option UDP/Datagram more low level options Sep 21, 2018
@addaleax addaleax added dgram Issues and PRs related to the dgram subsystem / UDP. feature request Issues that request new features to be added to Node.js. labels Sep 22, 2018
@addaleax
Copy link
Member

@nodejs/dgram

@Trott
Copy link
Member

Trott commented Nov 29, 2018

re-ping @nodejs/dgram Thoughts?

@ronkorving
Copy link
Contributor

I'm personally all for exposing these options. Not having been involved in the original authoring of dgram though, I'm not sure why things are the way they are.

@Trott
Copy link
Member

Trott commented Dec 6, 2018

Not having been involved in the original authoring of dgram though, I'm not sure why things are the way they are.

/ping @bnoordhuis maybe?

@mcollina
Copy link
Member

mcollina commented Dec 6, 2018

I’m +1 for exposing the options, I think it just needs somebody to work on this one.

@oyyd
Copy link
Contributor

oyyd commented Dec 6, 2018

It seems that windows doesn't support IP_MULTICAST_ALL directly. (Just FYI.)

@bnoordhuis
Copy link
Member

Node.js and libuv only support what can reasonably supported across platforms. As @oyyd mentions, there's no equivalent of IP_MULTICAST_ALL on (for example) Windows, so exposing it directly isn't an option.

However, libuv could call setsockopt(IP_MULTICAST_ALL, 0) to turn off promiscuous mode on Linux, that would make the behavior align with Windows and other Unices. Would that work?

The question then is if there's anyone out there relying (possibly unwittingly) on the existing behavior. We probably won't find out until we change it...

@bnoordhuis
Copy link
Member

OP didn't speak up and no one else spoke out pro or contra so I'm closing this out. Let me know if I should reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. feature request Issues that request new features to be added to Node.js. wontfix Issues that will not be fixed.
Projects
None yet
Development

No branches or pull requests

7 participants