aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man7
diff options
context:
space:
mode:
authorNeil Horman <nhorman@openssl.org>2023-10-31 11:54:03 -0400
committerRichard Levitte <levitte@openssl.org>2023-11-21 13:01:54 +0100
commit5091aadc223315ce115ee12f62df2af173bf5efb (patch)
tree850952514ebcd1d96e96a58e1617c79a1812e66d /doc/man7
parentcf6342bc024868f5a55f2225f2e083415fb1329a (diff)
downloadopenssl-5091aadc223315ce115ee12f62df2af173bf5efb.tar.gz
augment quic demos to support ipv4/6 connections
Because the quicserver utility supports expressly listening in ipv4/6 mode, its possible/likely that the server will listen on an ipv4 address, while the clients will connect via ipv6, leading to connection failures. Augment quic demo clients to afford them the same -6 option that the server has so that connection family can be co-ordinated Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22577)
Diffstat (limited to 'doc/man7')
-rw-r--r--doc/man7/ossl-guide-quic-client-block.pod2
-rw-r--r--doc/man7/ossl-guide-tls-client-block.pod6
2 files changed, 5 insertions, 3 deletions
diff --git a/doc/man7/ossl-guide-quic-client-block.pod b/doc/man7/ossl-guide-quic-client-block.pod
index fc8912086d..ab018e4a22 100644
--- a/doc/man7/ossl-guide-quic-client-block.pod
+++ b/doc/man7/ossl-guide-quic-client-block.pod
@@ -94,7 +94,7 @@ for TCP).
/*
* Lookup IP address info for the server.
*/
- if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, 0, SOCK_DGRAM, 0,
+ if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_DGRAM, 0,
&res))
return NULL;
diff --git a/doc/man7/ossl-guide-tls-client-block.pod b/doc/man7/ossl-guide-tls-client-block.pod
index cb67bf8fa9..ba59bd4ab3 100644
--- a/doc/man7/ossl-guide-tls-client-block.pod
+++ b/doc/man7/ossl-guide-tls-client-block.pod
@@ -174,7 +174,7 @@ integrate into the OpenSSL error system to log error data, e.g.
/*
* Lookup IP address info for the server.
*/
- if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, 0, SOCK_STREAM, 0,
+ if (!BIO_lookup_ex(hostname, port, BIO_LOOKUP_CLIENT, family, SOCK_STREAM, 0,
&res))
return NULL;
@@ -212,7 +212,9 @@ See L<BIO_lookup_ex(3)>, L<BIO_socket(3)>, L<BIO_connect(3)>,
L<BIO_closesocket(3)>, L<BIO_ADDRINFO_next(3)>, L<BIO_ADDRINFO_address(3)> and
L<BIO_ADDRINFO_free(3)> for further information on the functions used here. In
the above example code the B<hostname> and B<port> variables are strings, e.g.
-"www.example.com" and "443".
+"www.example.com" and "443". Note also the use of the family variable, which
+can take the values of AF_INET or AF_INET6 based on the command line -6 option,
+to allow specific connections to an ipv4 or ipv6 enabled host.
Sockets created using the methods described above will automatically be blocking
sockets - which is exactly what we want for this example.