MuhammedReza07 / dns_resolver

A simple DNS resolver in Rust written uisng standard library provided functionality.
1 stars 0 forks source link

Bug in displaying/reading DNS responses #20

Closed MuhammedReza07 closed 1 year ago

MuhammedReza07 commented 1 year ago

A bug has been detected where some records in the answer are excluded from the output. Should be investigated further.

MuhammedReza07 commented 1 year ago

Maybe it was a wrong observation, since I was both sending NS and A queries?

MuhammedReza07 commented 1 year ago

Response A:

HEADER opcode: QUERY, status: NOERROR, id: 0 flags: qr rd ra, QUESTION: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0

QUESTIONS github.com. IN NS

ANSWER SECTION github.com. 896 IN NS dns1.p08.nsone.net. github.com. 896 IN NS dns2.p08.nsone.net. github.com. 896 IN NS dns3.p08.nsone.net. github.com. 896 IN NS dns4.p08.nsone.net. github.com. 896 IN NS ns-1283.awsdns-32.org. github.com. 896 IN NS ns-1707.awsdns-21.co.uk. github.com. 896 IN NS ns-520.awsdns-01.net.

Response B:

HEADER opcode: QUERY, status: NOERROR, id: 0 flags: qr rd ra, QUESTION: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0

QUESTIONS github.com. IN NS

ANSWER SECTION github.com. 2238 IN NS dns1.p08.nsone.net. github.com. 2238 IN NS dns2.p08.nsone.net. github.com. 2238 IN NS dns3.p08.nsone.net. github.com. 2238 IN NS dns4.p08.nsone.net. github.com. 2238 IN NS ns-1283.awsdns-32.org.
github.com. 2238 IN NS ns-1707.awsdns-21.co.uk.
github.com. 2238 IN NS ns-421.awsdns-52.com. github.com. 2238 IN NS ns-520.awsdns-01.net.

MuhammedReza07 commented 1 year ago

Resposne from Google's DNS server, IP: 8.8.8.8.

MuhammedReza07 commented 1 year ago

Unable to replicate issue, more information when the issue returns.

MuhammedReza07 commented 1 year ago

It seems like this issue stems from opening and closing the terminal or something like that after writing the data to it. Nothing indicates that there are any "real" issues with the code.

Issue closed.