From: Howard Chu Date: Thu, 11 Apr 2002 10:04:29 +0000 (+0000) Subject: Fix ITS#1722 - IPv4 addresses also need to be massaged for sasl_server_new. X-Git-Tag: OPENLDAP_REL_ENG_2_MP~221 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=17433a84123814f3735c9bf3ca3e4b329d274e0f;p=openldap Fix ITS#1722 - IPv4 addresses also need to be massaged for sasl_server_new. --- diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index ce037a693f..bc75463834 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -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 = ';'; }