Skip to content
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

Merged
merged 3 commits into from
Aug 17, 2016
Merged

Truncated #5

merged 3 commits into from
Aug 17, 2016

Conversation

NewRegin
Copy link
Contributor

from issues 3 and this is the pr

// First EDNS, then TCP
fmt.Printf(";; Truncated, trying TCP\n")
c.Net = "tcp"
r, rtt, e = c.Exchange(m, nameserver)
Copy link
Owner

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

Copy link
Contributor Author

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~

Copy link
Owner

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.

Copy link
Contributor Author

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

@NewRegin
Copy link
Contributor Author

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
Copy link
Contributor Author

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~

@miekg
Copy link
Owner

miekg commented Aug 17, 2016

Nice. Looks good (I should a some travis build for this repo as well...)

@miekg miekg merged commit f1289ac into miekg:master Aug 17, 2016
@NewRegin
Copy link
Contributor Author

yeah, this code is so long that I will read more about "https://github.com/miekg/dns" and "https://github.com/miekg/exdns"~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants