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

Respect udp_answer_limit parameter even if UDP payload size is not 512 #3356

Closed
wants to merge 1 commit into from

Conversation

kamaradclimber
Copy link
Contributor

Fix #3355

Signed-off-by: Grégoire Seux g.seux@criteo.com

Fix hashicorp#3355

Change-Id: I3f6893224776d064b920ada9e1bf7e0fc58805ab
Signed-off-by: Grégoire Seux <g.seux@criteo.com>
@magiconair
Copy link
Contributor

Can you add a test for this, please?

@magiconair
Copy link
Contributor

magiconair commented Aug 9, 2017

@sethvargo this was introduced in a8f1e7e as part of #3131. You might want to have a look.

@@ -567,7 +567,7 @@ func trimUDPResponse(config *DNSConfig, req, resp *dns.Msg) (trimmed bool) {

// This cuts UDP responses to a useful but limited number of responses.
maxAnswers := lib.MinInt(maxUDPAnswerLimit, config.UDPAnswerLimit)
if maxSize == defaultMaxUDPSize && numAnswers > maxAnswers {
if numAnswers > maxAnswers {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea here is that, if request is edns and the size has changed from the default max size, we don't want to trim the answers or else they will be truncated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sethvargo I'm not sure to understand what you mean. Would you have an example?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can try "+bufsize=512" with dig , because the dig may not build with edns.

@kamaradclimber
Copy link
Contributor Author

abandoning this PR, I'll solve our issue with a different mechanism.

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.

4 participants