Attempting to specify an IPv6 address to a client-side ConnectionConfiguration, results in errors no matter how the address is formatted.
Specifying a simple IPv6 address like ::1 causes an AddrParseError(Socket) because the IP address and port are simply concatenated with a : between them, then fed into the SocketAddr parser. However, the SocketAddr parser expects IPv6 addresses to be surrounded with square brackets, like so: [::1]. Here is the full error reported:
thread 'tokio-runtime-worker' panicked at 'Failed to parse server address: AddrParseError(Socket)', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_quinnet-0.3.0/src/client/connection.rs:378:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Specifying a bracketed IPv6 address like [::1] causes an InvalidDnsName("[::1]") because the address is ultimately fed into an IpAddr parser when bevy_quinnet attempts to connect its Endpoint and the IpAddr parser expects IPv6 address to not be bracketed. Here is the full error reporteed:
thread 'tokio-runtime-worker' panicked at 'Failed to connect: configuration error: InvalidDnsName("[::1]")', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_quinnet-0.3.0/src/client/connection.rs:389:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The Issue
Attempting to specify an IPv6 address to a client-side
ConnectionConfiguration
, results in errors no matter how the address is formatted.Specifying a simple IPv6 address like
::1
causes anAddrParseError(Socket)
because the IP address and port are simply concatenated with a:
between them, then fed into theSocketAddr
parser. However, theSocketAddr
parser expects IPv6 addresses to be surrounded with square brackets, like so:[::1]
. Here is the full error reported:Specifying a bracketed IPv6 address like
[::1]
causes anInvalidDnsName("[::1]")
because the address is ultimately fed into anIpAddr
parser when bevy_quinnet attempts to connect itsEndpoint
and theIpAddr
parser expects IPv6 address to not be bracketed. Here is the full error reporteed:Versions
0.9.1
0.3.0