1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

tests: disable SO_EXCLUSIVEADDRUSE for stunnel on Windows

SO_EXCLUSIVEADDRUSE is on by default on Vista or newer,
but does not work together with SO_REUSEADDR being on.

The default changes were made with stunnel 5.34 and 5.35.
This commit is contained in:
Marc Hoersken 2018-11-15 21:10:29 +01:00
parent 3d988c5563
commit 9cf7b7e660

View File

@ -264,6 +264,11 @@ if($stunnel_version < 400) {
#
if($stunnel_version >= 400) {
$socketopt = "a:SO_REUSEADDR=1";
if(($stunnel_version >= 534) && $tstunnel_windows) {
# SO_EXCLUSIVEADDRUSE is on by default on Vista or newer,
# but does not work together with SO_REUSEADDR being on.
$socketopt .= "\nsocket = a:SO_EXCLUSIVEADDRUSE=0";
}
$cmd = "$stunnel $conffile ";
$cmd .= ">$logfile 2>&1";
# setup signal handler