diff options
author | Matt Caswell <matt@openssl.org> | 2016-05-16 16:54:28 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-16 17:19:55 +0100 |
commit | 6ae545248109710365189047ba945700ab8afff3 (patch) | |
tree | b911b91f0b5828cc763b752b34d7e32b5f0bd4e7 /util/TLSProxy | |
parent | 5c4328f04f63bc288d4e069e1453ab18b0309f16 (diff) | |
download | openssl-6ae545248109710365189047ba945700ab8afff3.tar.gz |
Workaround an IO::Socket::IP bug
Workaround an apparent IO:Socket::IP bug where a seemingly valid
server socket is being returned even though a valid connection does not
exist. This causes the tests to intermittently hang. We additionally check
that the peerport looks ok to verify that the returned socket looks usable.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'util/TLSProxy')
-rw-r--r-- | util/TLSProxy/Proxy.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm index 950fd90749..3b03ea9eeb 100644 --- a/util/TLSProxy/Proxy.pm +++ b/util/TLSProxy/Proxy.pm @@ -236,7 +236,9 @@ sub clientstart }; $retry--; - if ($@ || !defined($server_sock)) { + #Some buggy IP factories can return a defined server_sock that hasn't + #actually connected, so we check peerport too + if ($@ || !defined($server_sock) || !defined($server_sock->peerport)) { $server_sock->close() if defined($server_sock); undef $server_sock; if ($retry) { |