Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Implement RFC6761 reserved DNS names handling#6924

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rzikm wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromreserved-domain-names

Conversation

@rzikm
Copy link
Member

@rzikmrzikm commentedOct 15, 2025
edited
Loading

Replacesdotnet/aspire#10311 since the code moved to this repo.

The Managed DNS implementation correctly special-cased "localhost" and resolved to loopback without contacting DNS server, but the authoritative RFC 6761 requires the same for subdomains as well (e.g. service.localhost). Ths PR fills the gap, including the other special-cased name "invalid".

CopilotAI review requested due to automatic review settingsOctober 15, 2025 11:35
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements RFC 6761 compliant handling of reserved DNS names by extending special-case treatment beyond just "localhost" to include its subdomains (e.g., "service.localhost") and the "invalid" domain. The implementation centralizes reserved name checking and ensures DNS servers are not contacted for these special cases.

Key Changes:

  • Refactored localhost resolution logic into a sharedCheckIsReservedDnsName method that handles both "localhost" and "invalid" domains plus their subdomains
  • Added comprehensive test coverage for reserved name resolution including subdomain variants and explicit root labels

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
src/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns/Resolver/DnsResolver.csRefactored hardcoded localhost checks into centralized RFC 6761 reserved name handling with support for subdomains and the "invalid" domain
test/Libraries/Microsoft.Extensions.ServiceDiscovery.Dns.Tests/Resolver/ResolveAddressesTests.csAdded test cases for subdomain variants of reserved names and renamed test to reflect broader scope

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@ReubenBondReubenBondAwaiting requested review from ReubenBond

At least 1 approving review is required to merge this pull request.

Assignees

@rzikmrzikm

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@rzikm

[8]ページ先頭

©2009-2025 Movatter.jp