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 #13002

Merged
merged 3 commits into from May 14, 2024

Conversation

chobits
Copy link
Contributor

@chobits chobits commented May 9, 2024

Summary

Originally, Kong dns client will store records with non-matching domain/type when parsing answers. For instance, if Kong queried a domain with A type, and received CNAME+A records, Kong would store the CNAME record in its cache. Consequently, this would lead to subsequent queries for CNAME records, which is unnecessary behavior for a DNS client.

This fix will remove records with non-matching types, such as CNAME records from the answers of an A query.

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 KAG-4446, FTI-5834

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label May 9, 2024
@chobits chobits requested review from liverpool8056, dndx, chronolaw and Tieske and removed request for dndx May 9, 2024 07:31
@dndx dndx merged commit 40f43c9 into master May 14, 2024
25 checks passed
@dndx dndx deleted the fix/dns-cname branch May 14, 2024 10:03
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

git-hulk pushed a commit to git-hulk/kong that referenced this pull request May 14, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants