From: Marc Hoersken Date: Thu, 15 Nov 2018 20:10:29 +0000 (+0100) Subject: tests: disable SO_EXCLUSIVEADDRUSE for stunnel on Windows X-Git-Tag: curl-7_63_0~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cf7b7e66089ee2150ff6e5709a3cca91841ec0b;p=thirdparty%2Fcurl.git 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. --- diff --git a/tests/secureserver.pl b/tests/secureserver.pl index c897ee5f1c..969fb17b5a 100755 --- a/tests/secureserver.pl +++ b/tests/secureserver.pl @@ -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