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

Inspect uses of dns.(*Msg).Question[0] #2465

Closed
ainar-g opened this issue Dec 21, 2020 · 0 comments
Closed

Inspect uses of dns.(*Msg).Question[0] #2465

ainar-g opened this issue Dec 21, 2020 · 0 comments
Assignees
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Dec 21, 2020

We have some places in our code where we just always assume that a *dns.Msg always has at least one question. We should make sure that that's the case. Add validations, where there are none. Document requirements in functions' documentation. Perhaps call functions that only need a question that question directly.

@ainar-g ainar-g added this to the v0.105.0 milestone Dec 21, 2020
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2465-question-0 to master

Closes AdguardTeam#2465.

Squashed commit of the following:

commit 0dbcaf7
Merge: 0d7c22c 8a1d86a
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Dec 28 19:09:25 2020 +0300

    Merge branch 'master' into 2465-question-0

commit 0d7c22c
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Dec 23 14:17:13 2020 +0300

    dnsforward: doc the Question[0] inspection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants