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

exchanger: Fix Recurse logic #302

Closed
wants to merge 1 commit into from
Closed

exchanger: Fix Recurse logic #302

wants to merge 1 commit into from

Conversation

tsenart
Copy link
Contributor

@tsenart tsenart commented Oct 6, 2015

This commit fixes a logic bug introduced with the refactoring of the external
resolver code: 31f5539

The bug manifested when external queries would be sent to configured resolvers
that would reply with non-authoritative answers. These answers weren't
considered valid and if the message would contain an SOA record in its
authoritative section then it would be erroneously recursed.

This commit fixes a logic bug introduced with the refactoring of the external
resolver code: 31f5539

The bug manifested when external queries would be sent to configured resolvers
that would reply with non-authoritative answers. These answers weren't
considered valid and if the message would contain an SOA record in its
authoritative section then it would be erroneously recursed.
@tsenart tsenart modified the milestone: v1.0.0 Oct 6, 2015
@tsenart
Copy link
Contributor Author

tsenart commented Oct 6, 2015

Ref: #301

func Recurse(r *dns.Msg) string {
if r.Authoritative && len(r.Answer) > 0 {
if r.Authoritative || len(r.Answer) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment now does not match the logic:

not-authorative or no answer
<=> !r.Authoritative || len(r.Answer)==0
<=> !(r.Authoritative && len(r.Answer)>0)

@tsenart
Copy link
Contributor Author

tsenart commented Oct 7, 2015

Closed in favour of #307.

@tsenart tsenart closed this Oct 7, 2015
@tsenart tsenart removed the PTAL label Oct 7, 2015
@alberts alberts deleted the fix-recurser branch January 27, 2017 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants