Ensure we exchange cookies in s_server even if SCTP is disabled
authorMatt Caswell <matt@openssl.org>
Thu, 24 Aug 2017 08:52:11 +0000 (09:52 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 25 Aug 2017 09:50:56 +0000 (10:50 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4243)

apps/s_server.c

index 81ae6dba3e89defe0a766ac2cdd8d735ee864d38..c45256afc2fbeda695fc5f0813f98a81f2fc97fb 100644 (file)
@@ -2262,11 +2262,10 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
             BIO_ctrl(sbio, BIO_CTRL_DGRAM_MTU_DISCOVER, 0, NULL);
 
 # ifndef OPENSSL_NO_SCTP
-        if (prot != IPPROTO_SCTP) {
+        if (prot != IPPROTO_SCTP)
+# endif
             /* Turn on cookie exchange. Not necessary for SCTP */
             SSL_set_options(con, SSL_OP_COOKIE_EXCHANGE);
-        }
-# endif
     } else
 #endif
         sbio = BIO_new_socket(s, BIO_NOCLOSE);