-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
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.lookup("localhost", { all: true, order: "ipv4first" }, console.log);
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
The script prints:
null [ { address: '127.0.0.1', family: 4 }, { address: '::1', family: 6 } ]
What do you see instead?
The script prints:
null [ { address: '::1', family: 6 }, { address: '127.0.0.1', family: 4 } ]
Additional information
The issue doesn't happen with dns.promises.lookup
. The below script prints ipv4 address first:
import dns from "node:dns";
console.log(await dns.promises.lookup("localhost", { all:true, order: "ipv4first" }));
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.