-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncated #5
Truncated #5
Conversation
// First EDNS, then TCP | ||
fmt.Printf(";; Truncated, trying TCP\n") | ||
c.Net = "tcp" | ||
r, rtt, e = c.Exchange(m, nameserver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm, we should also quit if the tcp query also comes back truncated? If not we enter an infinite loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, by tcp, the msg will cut into slices, so do we should consider about this case? Maybe I am wrong, if so, I am really sorry~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, when you get a truncated TCP message there is no follow up, the client should then just give up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, you mean the server may truncate the tcp msg, I will change the code
the first one is something wrong(delete something), I am so sorry~ |
c.Net = "tcp" | ||
r, rtt, e = c.Exchange(m, nameserver) | ||
*fallback = false | ||
goto Redo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set *fallback false and output "Truncated", this is OK~
Nice. Looks good (I should a some travis build for this repo as well...) |
yeah, this code is so long that I will read more about "https://github.com/miekg/dns" and "https://github.com/miekg/exdns"~ |
from issues 3 and this is the pr