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

fix(dns): ignore records with non-matching types when parsing answers and disable additional_section #13294

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chobits
Copy link
Contributor

@chobits chobits commented Jun 24, 2024

Summary

Fix the regression caused by #13002, which was reverted in #13276. The kong DNS client incorrectly thinks all the RRs in additional section as results of queried name. This bug is caused by:

  1. The DNS client using the content of additional section from the response was introduced in 3.0 as part of an perf optimization
  2. The DNS fix fix(dns): ignore records with non-matching types when parsing answers #13002, introduced in kong supposedly makes us more standard compliant. However, using any A records from additional section will be a severe bug, (using any A records from the answers section is expected and correct).

This fix now removes records with non-matching types, such as CNAME records from the answers of an A query, and it disables the ADDITIONAL SECTION in DNS responses, which was introduced by #8895.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix FTI-6038, KAG-4787

@chobits chobits marked this pull request as draft June 24, 2024 11:19
@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Jun 24, 2024
@chobits chobits requested review from chronolaw, locao and dndx June 25, 2024 02:19
@chobits chobits marked this pull request as ready for review June 25, 2024 02:19
@chobits chobits marked this pull request as draft July 10, 2024 02:25
@chobits
Copy link
Contributor Author

chobits commented Jul 10, 2024

convert it to draft, it may introduce a break change if the dns server can't do recursive resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/L
2 participants