Skip to content

fix(dns): support bare IPv6 resolver addresses#6199

Open
Harshal96 wants to merge 1 commit into
eclipse-vertx:masterfrom
Harshal96:feat/issue-6194-ipv6-dns-server
Open

fix(dns): support bare IPv6 resolver addresses#6199
Harshal96 wants to merge 1 commit into
eclipse-vertx:masterfrom
Harshal96:feat/issue-6194-ipv6-dns-server

Conversation

@Harshal96

Copy link
Copy Markdown
Contributor

Motivation:

Fixes #6194

Fixes parsing of configured DNS resolver addresses so bare IPv6 literals are accepted without being mistaken for host:port values.

IPv6 DNS server addresses contain : characters, so the previous lastIndexOf(':') parsing treated bare IPv6 literals as if they included a port. That could reject valid resolver addresses or parse them incorrectly.

How

  • Detects whether a configured DNS server string actually includes a port.
  • Uses Vert.x URI parsing helpers to distinguish IP literals from host:port values.
  • Preserves support for IPv6 resolver addresses that explicitly include a port.
  • Adds regression coverage for bare IPv6 resolver addresses and IPv6 addresses with ports.

Testing

  • Added NameResolverTest coverage for bare IPv6 DNS servers.
  • Added coverage for IPv6 DNS server entries with explicit ports.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AddressResolverOptions does not accept bare IPv6 DNS server addresses

1 participant