Title: `order: ipv4first` doesn't seem to have effect in dns.lookup? · Issue #55391 · nodejs/node · GitHub
Open Graph Title: `order: ipv4first` doesn't seem to have effect in dns.lookup? · Issue #55391 · nodejs/node
X Title: `order: ipv4first` doesn't seem to have effect in dns.lookup? · Issue #55391 · nodejs/node
Description: Version 22.7.0 Platform Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64 Subsystem dns What steps will reproduce the bug? Run: import dns from "node:dns"; dns.look...
Open Graph Description: Version 22.7.0 Platform Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64 Subsystem dns What steps will reproduce the bug? R...
X Description: Version 22.7.0 Platform Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64 Subsystem dns What steps will reproduce the bug? R...
Opengraph URL: https://github.com/nodejs/node/issues/55391
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`order: ipv4first` doesn't seem to have effect in dns.lookup?","articleBody":"### Version\n\n22.7.0\n\n### Platform\n\n```text\nDarwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64\n```\n\n\n### Subsystem\n\ndns\n\n### What steps will reproduce the bug?\n\nRun:\r\n```js\r\nimport dns from \"node:dns\";\r\ndns.lookup(\"localhost\", { all: true, order: \"ipv4first\" }, console.log);\r\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe script prints:\r\n```\r\nnull [ { address: '127.0.0.1', family: 4 }, { address: '::1', family: 6 } ]\r\n```\n\n### What do you see instead?\n\nThe script prints:\r\n```\r\nnull [ { address: '::1', family: 6 }, { address: '127.0.0.1', family: 4 } ]\r\n```\n\n### Additional information\n\nThe issue doesn't happen with `dns.promises.lookup`. The below script prints ipv4 address first:\r\n\r\n```js\r\nimport dns from \"node:dns\";\r\nconsole.log(await dns.promises.lookup(\"localhost\", { all:true, order: \"ipv4first\" }));\r\n```","author":{"url":"https://github.com/kt3k","@type":"Person","name":"kt3k"},"datePublished":"2024-10-15T07:39:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/55391/node/issues/55391"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b2806c18-3ed4-bfbe-1a61-673cb3ff07fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94EA:147E0:472C0E4:5DB0473:6992F3BA |
| html-safe-nonce | aa1d276b9e1c61d3baeb0209194e1f97d8ee3bfcb7d9f41985c46a840034f937 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEVBOjE0N0UwOjQ3MkMwRTQ6NURCMDQ3Mzo2OTkyRjNCQSIsInZpc2l0b3JfaWQiOiIzOTcwMTA2MjQ5MzU4NTM3NjU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c5b8965c65b60008dd58a3b878ff126d2cafa0931271091a3445c624d16e069c |
| hovercard-subject-tag | issue:2587917317 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/55391/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7be30d937e03d239f14957e77f87ed4e9fa72b3cd6c5b4b48e02297c792209fa/nodejs/node/issues/55391 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7be30d937e03d239f14957e77f87ed4e9fa72b3cd6c5b4b48e02297c792209fa/nodejs/node/issues/55391 |
| og:image:alt | Version 22.7.0 Platform Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64 Subsystem dns What steps will reproduce the bug? R... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kt3k |
| hostname | github.com |
| expected-hostname | github.com |
| None | 348cc0594c4976eb4050dc9547ecf65057ee89a2b7ed0652b983b9b539f57145 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ce72317238c729e85014e1d867fd30d09b7f94ba |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width