]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#1722 - IPv4 addresses also need to be massaged for sasl_server_new.
authorHoward Chu <hyc@openldap.org>
Thu, 11 Apr 2002 10:04:29 +0000 (10:04 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 11 Apr 2002 10:04:29 +0000 (10:04 +0000)
servers/slapd/sasl.c

index ce037a693f14a90a2590330d07eddeca1ac58d5e..bc7546383419022311427a817fe09629e210a6f9 100644 (file)
@@ -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 = ';';
                }