Details
-
Bug
-
Status: Closed
-
Critical - P2
-
Resolution: Fixed
-
1.0.0
-
None
-
None
Description
The stream initiator uses the following template for constructing both AF_INET6 and AF_INET connections:
dsn_len = spprintf(&dsn, 0, "tcp://%s:%d", host->host, host->port);
|
AF_INET6 requires us to enclose ipv6 literals in brackets (like the MongoDB URI):
dsn_len = spprintf(&dsn, 0, "tcp://[%s]:%d", host->host, host->port);
|
This jives with this note from stream_socket_client() in the PHP manual:
When specifying a numerical IPv6 address (e.g. fe80::1), you must enclose the IP in square brackets—for example, tcp://[fe80::1]:80.