-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
dgram: default send address to 127.0.0.1 or ::1 #5493
Conversation
This does include a |
@silverwind yes. Both |
Ah, alright, misread that change. I think you can do |
before re-reading the docs last week i thought it already worked like this so big +1 from me. |
Since this will be a semver-major, can we make the address in |
I'm not opposed to this, but if we do that, we need to do it in |
@mafintosh do you think that defining it as semver-major is too strict? Given that's how people use this, should it be semver-minor? @saghul @silverwind I think those needs to be two separate fixes. To remove the default from |
There is no |
There is |
Ouch. Yeah, IMHO that should be mandatory too. The only place where it's ok On Mon, Feb 29, 2016 at 10:59 PM, Matteo Collina notifications@github.com
/Saúl |
I would expect |
00e1427
to
ba43aff
Compare
@Trott no, lint passes. Good spot, I've updated the tests. @saghul I agree with you that Can I get a bunch of LGTM (or comments) so we land this? Also, given that the intended behavior of |
address = '0.0.0.0'; | ||
} else if (!address && self._handle.lookup === lookup6) { | ||
address = '::0'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this "::" ?
LGTM with a bit. |
ba43aff
to
ba6635a
Compare
LGTM. Regarding semver: what does a send to |
The behavior that I am seeing is: it just picks one of the interfaces on Linux and OS X, normally localhost. On Windows nothing is received. |
I'd say this is patch level commit if it's been going to localhost on most OSs. |
ba6635a
to
7c9732b
Compare
@saghul I've got a test failure on ARM with the Restarted as https://ci.nodejs.org/job/node-test-pull-request/1831/. |
@rvagg any idea why these builds are failing? https://ci.nodejs.org/job/node-test-pull-request/1831/ https://ci.nodejs.org/job/node-test-pull-request/1832 |
@mcollina did you check that |
Let's try again: https://ci.nodejs.org/job/node-test-pull-request/1845/ :) |
7c9732b
to
d3a508a
Compare
Skipping the dgram6 tests if ipv6 is not supported: https://ci.nodejs.org/job/node-test-pull-request/1846/. |
In net we default to 'localhost' as the default address for connect. Not doing the same on dgram is confusing, because sending to 0.0.0.0 works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 / ::1 addresses that. Related: nodejs#5407 Related: nodejs#5398 Fixes: nodejs#5487
d3a508a
to
cdb236d
Compare
Thanks @silverwind, that did the trick. Any other opinion on the semver level? I think semver-minor or even patch are good: the behavior we are changing is broken in the affected OS. I'm changing this to patch, and I propose we don't land this in LTS anyway (just in case). Any other opinion, lgtm or anything else before I land? |
I see two failed tests on OSX, but I can't open them https://ci.nodejs.org/job/node-test-commit-osx/2500/nodes=osx1010/ |
Getting gateway timeouts too. The failures look unrelated, here they are from the plaintext output:
|
Landed in 8af4bb8. |
In net we default to 'localhost' as the default address for connect. Not doing the same on dgram is confusing, because sending to 0.0.0.0 works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 / ::1 addresses that. Related: #5407 Related: #5398 Fixes: #5487 PR-URL: #5493 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In net we default to 'localhost' as the default address for connect. Not doing the same on dgram is confusing, because sending to 0.0.0.0 works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 / ::1 addresses that. Related: #5407 Related: #5398 Fixes: #5487 PR-URL: #5493 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
In net we default to 'localhost' as the default address for connect. Not doing the same on dgram is confusing, because sending to 0.0.0.0 works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 / ::1 addresses that. Related: #5407 Related: #5398 Fixes: #5487 PR-URL: #5493 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Pull Request check-list
make -j8 test
(UNIX) orvcbuild test nosign
(Windows) pass withthis change (including linting)?
test (or a benchmark) included?
existing APIs, or introduces new ones)?
Affected core subsystem(s)
dgram
Description of change
In net we default to 'localhost' as the default address for connect.
Not doing the same on dgram is confusing, because sending to 0.0.0.0
works on Linux/OS X but not on Windows. Defaulting that to 127.0.0.1 /
::1 addresses that.
Related: #5407
Related: #5398
Fixes: #5487
cc @mafintosh @rvagg @cjihrig @saghul @feross @silverwind