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

Dns resolver ipv6 #1082

Closed
0x4139 opened this issue Mar 6, 2015 · 8 comments
Closed

Dns resolver ipv6 #1082

0x4139 opened this issue Mar 6, 2015 · 8 comments
Labels
dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations.

Comments

@0x4139
Copy link

0x4139 commented Mar 6, 2015

require('http') is responsible for passing the host to the dns resolver, when the the address you want to bind on is ipv6 the dns resolver should return the ipv6 address instead of the ipv4 one.

@Fishrock123
Copy link
Contributor

I think @cjihrig did a lot of the ipv6 stuff

@Fishrock123 Fishrock123 added the dns Issues and PRs related to the dns subsystem. label Mar 6, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Mar 6, 2015

@0x4139 could you please provide some example code of what you're looking for? For example, the following code will only work if you uncomment the family: 6 line.

'use strict';
var http = require('http');
var server = http.createServer(function(req, res) {
  res.end();
});

server.listen({port: 4000, host: '::1'}, function() {
  var connection = http.get({
    port: 4000,
    // family: 6
  }, function() {
    server.close();
  });
});

Or, is the problem with trying to force something like localhost to bind to IPv6?

@gildean
Copy link

gildean commented Mar 9, 2015

I think the main problem here is that the docs don't mention anything about a family property in the request options.

@silverwind
Copy link
Contributor

ping @0x4139

@Fishrock123 Fishrock123 added the doc Issues and PRs related to the documentations. label Apr 28, 2015
@0x4139
Copy link
Author

0x4139 commented Apr 28, 2015

@silverwind sorry for the delayed answer this is what i was looking for!

@silverwind
Copy link
Contributor

@cjihrig the family option there is only used for resolution of host, right?

@cjihrig
Copy link
Contributor

cjihrig commented Apr 28, 2015

@silverwind, yes I think it's currently undocumented behavior, but the family option eventually makes its way here to resolve the host.

silverwind added a commit that referenced this issue May 1, 2015
This adds a few previously undocumented option to both functions.

PR-URL: #1551
Fixes: #1082
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@silverwind
Copy link
Contributor

Fixed by b4ad5d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants