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: lookup more specific DNS names directly #9815

Merged
merged 2 commits into from Dec 11, 2023

Conversation

simonrw
Copy link
Contributor

@simonrw simonrw commented Dec 6, 2023

Motivation

When resolving DNS names, if someone adds a more specific entry to an existing entry with a wildcard, the more specific name is not matched. For example:

ADD foo.example.com 1.2.3.4
ADD *.example.com 5.6.7.8

dig foo.example.com => 5.6.7.8
dig bar.example.com => 5.6.7.8

A request to foo.example.com should resolve to 1.2.3.4

Changes

Look up the DNS name by string, which is what we store in the add_host method

@simonrw simonrw added the semver: patch Non-breaking changes which can be included in patch releases label Dec 6, 2023
@simonrw simonrw self-assigned this Dec 6, 2023
@coveralls
Copy link

Coverage Status

coverage: 84.28% (+0.02%) from 84.263%
when pulling 6697b3d on fix/dns-hostname-overrides-matching
into 0595d87 on master.

Copy link

github-actions bot commented Dec 6, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 11m 31s ⏱️
2 397 tests 2 169 ✔️ 228 💤 0
2 398 runs  2 169 ✔️ 229 💤 0

Results for commit 6697b3d.

@simonrw simonrw marked this pull request as ready for review December 6, 2023 16:21
@simonrw simonrw requested a review from dfangl as a code owner December 6, 2023 16:21
@simonrw simonrw requested a review from joe4dev December 7, 2023 19:44
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

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

Good catch! The trailing dot inconsistency were quite annoying!

@simonrw simonrw merged commit a4f0a22 into master Dec 11, 2023
26 checks passed
@simonrw simonrw deleted the fix/dns-hostname-overrides-matching branch December 11, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants