Closed vishalmohanty closed 2 months ago
do you know why when running your example, but with the iterative flag, some results still are missing the protocol/resolver?
echo "google.com" | sudo ./zdns A --retries=10 --all-nameservers --iterative | jq
{
"data": {
"results": [
{
"nameserver": "ns2.google.com",
"result": {
"answers": [
{
"answer": "142.251.46.238",
"class": "IN",
"name": "google.com",
"ttl": 300,
"type": "A"
}
],
"protocol": "udp",
"resolver": "216.239.36.10:53"
},
"status": "NOERROR"
},
{
"nameserver": "ns1.google.com",
"result": {
"answers": [
{
"answer": "142.251.46.238",
"class": "IN",
"name": "google.com",
"ttl": 300,
"type": "A"
}
],
"protocol": "",
"resolver": ""
},
"status": "NOERROR"
},
{
"nameserver": "ns3.google.com",
"result": {
"answers": [
{
"answer": "142.251.46.238",
"class": "IN",
"name": "google.com",
"ttl": 300,
"type": "A"
}
],
"protocol": "",
"resolver": ""
},
"status": "NOERROR"
},
{
"nameserver": "ns4.google.com",
"result": {
"answers": [
{
"answer": "142.251.46.238",
"class": "IN",
"name": "google.com",
"ttl": 300,
"type": "A"
}
],
"protocol": "",
"resolver": ""
},
"status": "NOERROR"
}
]
},
"name": "google.com",
"status": "NOERROR",
"timestamp": "2022-04-28T19:33:24Z"
}
@LizIzhikevich that is because in the --iterative
mode, the response is getting cached and hence the requests after the first all get back the cached response (with missing resolver). I need some help in running the --iterative
mode without using the cache. --cache-size=0
still returns cached response.
ok. im happy to approve this PR on my end---since it does solve the root problem--- but sounds like you might need to open a new issue that addresses cache=0 not working haha.
I want to take a pass on this before we merge. I'm not sure this is the right place for the code.
I'm going to close this PR but we'll be addressing --all-nameservers
soon.
This diff does the following.
Test: