Convert DTLSv1_listen to use new state machine code
The DTLSv1_listen code set the state value explicitly to move into init. Change to use state_set_in_init() instead. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
		@@ -868,11 +868,8 @@ int dtls1_listen(SSL *s, struct sockaddr *client)
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
 | 
					    SSL_set_options(s, SSL_OP_COOKIE_EXCHANGE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					    /* Put us into the "init" state so that we don't get our state cleared */
 | 
				
			||||||
     * Put us into the "init" state so that dtls1_accept doesn't clear our
 | 
					    statem_set_in_init(s, 1);
 | 
				
			||||||
     * state
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    s->state = SSL_ST_ACCEPT;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(BIO_dgram_get_peer(rbio, client) <= 0) {
 | 
					    if(BIO_dgram_get_peer(rbio, client) <= 0) {
 | 
				
			||||||
        SSLerr(SSL_F_DTLS1_LISTEN, ERR_R_INTERNAL_ERROR);
 | 
					        SSLerr(SSL_F_DTLS1_LISTEN, ERR_R_INTERNAL_ERROR);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user