eclipse-vertx / eclipse-vertx/vert.x

AddressResolverOptions does not accept bare IPv6 DNS server addresses

Open
#6,194 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14.7k
Forks
2.1k
Avg merge
1d 10h
Merged PRs (30d)
27

Description

### Version

4.x, 5.x

### Context

AddressResolverOptions#setServers says each DNS server entry is the IP address of the DNS server, optionally followed by `:port`. The Vert.x guide also says the default DNS server port is 53 when no port is specified.

Based on that, I expected a bare IPv6 DNS server address such as Google Public DNS IPv6 to be accepted and use the default port.

Currently, resolver initialization fails for this value, apparently because the IPv6 colons are interpreted as part of the host/port syntax.

This is only about the bare IPv6/no-port case.

### Steps to reproduce

```java
Vertx.vertx(new VertxOptions()
.setAddressResolverOptions(new AddressResolverOptions()
.addServer("2001:4860:4860::8888"))); // Google Public DNS IPv6
```

### Do you have a reproducer?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.