Skip to content

Conversation

santigimeno
Copy link
Member

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc,dgram

Description of change

Adding membership using IP_ADD_MEMBERSHIP with interface address set
to INADDR_ANY for IPv4 or as an index of 0 for IPv6 leads to
using only one interface selected by the operating system.

Fixes: #1692

From Stevens UNIX Network Programming

If the local interface is specified as the wildcard address for IPv4 ( INADDR_ANY ) or as an index of 0 for IPv6, then a single local interface is chosen by the kernel.

On Windows from https://msdn.microsoft.com/en-us/library/windows/desktop/ms738695%28v=vs.85%29.aspx

If this member specifies an IPv4 address of 0.0.0.0, the default IPv4 multicast interface is used.

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jun 9, 2016
@santigimeno santigimeno added the dgram Issues and PRs related to the dgram subsystem / UDP. label Jun 9, 2016
@santigimeno
Copy link
Member Author

Comments on this? Thanks

@bnoordhuis
Copy link
Member

LGTM

1 similar comment
@cjihrig
Copy link
Contributor

cjihrig commented Jul 8, 2016

LGTM

Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: nodejs#1692
PR-URL: nodejs#7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@santigimeno santigimeno merged commit 5a641e2 into nodejs:master Jul 10, 2016
@santigimeno
Copy link
Member Author

Landed in 5a641e2. Thanks

MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
evanlucas pushed a commit that referenced this pull request Jul 15, 2016
Adding membership using `IP_ADD_MEMBERSHIP` with interface address set
to `INADDR_ANY` for `IPv4` or as an index of `0` for `IPv6` leads to
using only one interface selected by the operating system.

Fixes: #1692
PR-URL: #7244
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
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. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dgram]socket.addMembership() does not add membership to every interface
5 participants