-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 1.0.0
-
Component/s: None
-
None
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.