dns.resolveSoa returns EBADRESP if hostname has a CNAME record
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 122k
- Fork
- 37.3k
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 283
Mô tả
- Version(s): v12.16.3 / v12.18.3 / v12.18.0
- Platform: Windows / Windows Subsystem for Linux (Debian) / Red Hat Enterprise Linux Server release 7.8
- Subsystem: DNS
What steps will reproduce the bug?
const dns = require('dns');
const resolver = new dns.promises.Resolver();
// **************************************************************
async function test(hostname) {
let data = '';
console.log('hostname:', hostname);
try {
data = await resolver.resolveCname(hostname);
console.log('CNAME result:', data);
} catch (error) {
console.log('CNAME result:', error.message);
}
try {
data = await resolver.resolveSoa(hostname);
console.log('SOA result:', JSON.stringify(data));
} catch (error) {
console.log('SOA result:', error.message);
}
console.log();
}
// **************************************************************
(async function main() {
await test('support.microsoft.com');
})();
Actual Results
hostname: support.microsoft.com
CNAME result: [ 'ev.support.microsoft.com.edgekey.net' ]
SOA result: querySoa EBADRESP support.microsoft.com
Expected Results
hostname: support.microsoft.com
CNAME result: [ 'ev.support.microsoft.com.edgekey.net' ]
SOA result: querySoa ENODATA support.microsoft.com
Additional information
This seems to happen for any hostname with a CNAME record.
Another example:
hostname: store.gocomics.com
CNAME result: [ 'gocomicsstore.wpengine.com' ]
SOA result: querySoa EBADRESP store.gocomics.com
I would expect to get an 'ENODATA' instead of 'EBADRESP', as with the other resolveXXX() calls.
For a hostname with an SOA record but no CNAME, you get:
hostname: microsoft.com
CNAME result: queryCname ENODATA microsoft.com
SOA result: {"nsname":"ns1-205.azure-dns.com","hostmaster":"azuredns-
hostmaster.microsoft.com","serial":1,"refresh":3600,"retry":300,"expire":2419200,"minttl":300}
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách chạy reproduction dns.promises.Resolver được cung cấp với một hostname có bản ghi CNAME, sau đó so sánh resolveSoa với resolveCname và hành vi lỗi mong đợi. Payload không nêu tên tệp nguồn hay test nào, vì vậy hãy xác định implementation của DNS resolver và các test resolveSoa của nó; được xem là hoàn tất khi các đích CNAME trả về ENODATA thay vì EBADRESP.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, node.js
- Lĩnh vực
- networking
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100