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-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label Jun 9, 2016
@santigimenosantigimeno added the dgram Issues and PRs related to the dgram subsystem / UDP. label Jun 9, 2016
@santigimeno
Copy link
MemberAuthor

Comments on this? Thanks

@bnoordhuis
Copy link
Member

LGTM

1 similar comment
@cjihrig
Copy link
Contributor

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]>
@santigimenosantigimeno merged commit 5a641e2 into nodejs:masterJul 10, 2016
@santigimeno
Copy link
MemberAuthor

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]>
@MylesBorinsMylesBorins 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]>
@evanlucasevanlucas mentioned this pull request Jul 18, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dgramIssues and PRs related to the dgram subsystem / UDP.docIssues 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

@santigimeno@bnoordhuis@cjihrig@MylesBorins@nodejs-github-bot