Skip to content
Snippets Groups Projects
Commit 17433a84 authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#1722 - IPv4 addresses also need to be massaged for sasl_server_new.

parent 1dcbb23f
No related branches found
No related tags found
No related merge requests found
......@@ -755,6 +755,8 @@ int slap_sasl_open( Connection *conn )
iplocalport = ch_strdup( conn->c_sock_name.bv_val + 3 );
/* Convert IPv6 addresses to address;port syntax. */
p = strrchr( iplocalport, ' ' );
/* Convert IPv4 addresses to address;port syntax. */
if ( p != NULL ) p = strchr( iplocalport, ':' );
if ( p != NULL ) {
*p = ';';
}
......@@ -766,6 +768,8 @@ int slap_sasl_open( Connection *conn )
ipremoteport = ch_strdup( conn->c_peer_name.bv_val + 3 );
/* Convert IPv6 addresses to address;port syntax. */
p = strrchr( ipremoteport, ' ' );
/* Convert IPv4 addresses to address;port syntax. */
if ( p != NULL ) p = strchr( ipremoteport, ':' );
if ( p != NULL ) {
*p = ';';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment