]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9481 - Fix cases when IPv6 support is disabled
authorQuanah Gibson-Mount <quanah@openldap.org>
Tue, 2 Mar 2021 21:03:40 +0000 (21:03 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 8 Mar 2021 18:10:41 +0000 (18:10 +0000)
servers/slapd/main.c
servers/slapd/proxyp.c
servers/slapd/slap.h

index 22f117696f6bf9bbc0a17d2caf8fb6ba910510ee..8af74e8043737e4a5ce7137385332b0967a273fa 100644 (file)
@@ -310,7 +310,9 @@ usage( char *name )
                "usage: %s options\n", name );
        fprintf( stderr,
                "\t-4\t\tIPv4 only\n"
+#ifdef LDAP_PF_INET6
                "\t-6\t\tIPv6 only\n"
+#endif
                "\t-T {acl|add|auth|cat|dn|index|modify|passwd|test}\n"
                "\t\t\tRun in Tool mode\n"
                "\t-c cookie\tSync cookie of consumer\n"
@@ -483,10 +485,10 @@ int main( int argc, char **argv )
 #endif
                             )) != EOF ) {
                switch ( i ) {
-#ifdef LDAP_PF_INET6
                case '4':
                        slap_inet4or6 = AF_INET;
                        break;
+#ifdef LDAP_PF_INET6
                case '6':
                        slap_inet4or6 = AF_INET6;
                        break;
index 8c28abe19f59bf76d072521611b3549e848bffec..e0342e802b11c225b7e54ae796ac197b6d66d4c4 100644 (file)
@@ -172,7 +172,7 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) {
                        from->sa_in6_addr.sin6_port = ppa.ip6.src_port;
 #else
                        Debug( LDAP_DEBUG_ANY, "proxyp(%ld): "
-                                       "IPv6 proxied addresses disabled\n",
+                                       "IPv6 proxied addresses disabled\n",
                                        (long)sfd );
                        return 0;
 #endif
index 2a52fe74a6afb54701cbc679ebc5173b7435ea9a..40e6aa6f9868e85423ddee9f23383714e65c4aef 100644 (file)
@@ -372,9 +372,7 @@ typedef struct Operation Operation;
 typedef struct SlapReply SlapReply;
 /* end of forward declarations */
 
-#ifdef LDAP_PF_INET6
 extern int slap_inet4or6;
-#endif
 
 struct OidMacro {
        struct berval som_oid;