From 9cf7b7e66089ee2150ff6e5709a3cca91841ec0b Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Thu, 15 Nov 2018 21:10:29 +0100 Subject: 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. --- tests/secureserver.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/secureserver.pl b/tests/secureserver.pl index c897ee5f1..969fb17b5 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 -- cgit v1.2.1