Commit 891fc1e1 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#9481 - Fix cases when IPv6 support is disabled

parent b91491a8
...@@ -310,7 +310,9 @@ usage( char *name ) ...@@ -310,7 +310,9 @@ usage( char *name )
"usage: %s options\n", name ); "usage: %s options\n", name );
fprintf( stderr, fprintf( stderr,
"\t-4\t\tIPv4 only\n" "\t-4\t\tIPv4 only\n"
#ifdef LDAP_PF_INET6
"\t-6\t\tIPv6 only\n" "\t-6\t\tIPv6 only\n"
#endif
"\t-T {acl|add|auth|cat|dn|index|modify|passwd|test}\n" "\t-T {acl|add|auth|cat|dn|index|modify|passwd|test}\n"
"\t\t\tRun in Tool mode\n" "\t\t\tRun in Tool mode\n"
"\t-c cookie\tSync cookie of consumer\n" "\t-c cookie\tSync cookie of consumer\n"
...@@ -483,10 +485,10 @@ int main( int argc, char **argv ) ...@@ -483,10 +485,10 @@ int main( int argc, char **argv )
#endif #endif
)) != EOF ) { )) != EOF ) {
switch ( i ) { switch ( i ) {
#ifdef LDAP_PF_INET6
case '4': case '4':
slap_inet4or6 = AF_INET; slap_inet4or6 = AF_INET;
break; break;
#ifdef LDAP_PF_INET6
case '6': case '6':
slap_inet4or6 = AF_INET6; slap_inet4or6 = AF_INET6;
break; break;
......
...@@ -172,7 +172,7 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) { ...@@ -172,7 +172,7 @@ proxyp( ber_socket_t sfd, Sockaddr *from ) {
from->sa_in6_addr.sin6_port = ppa.ip6.src_port; from->sa_in6_addr.sin6_port = ppa.ip6.src_port;
#else #else
Debug( LDAP_DEBUG_ANY, "proxyp(%ld): " Debug( LDAP_DEBUG_ANY, "proxyp(%ld): "
"IPv6 proxied addresses disabled, \n", "IPv6 proxied addresses disabled\n",
(long)sfd ); (long)sfd );
return 0; return 0;
#endif #endif
......
...@@ -372,9 +372,7 @@ typedef struct Operation Operation; ...@@ -372,9 +372,7 @@ typedef struct Operation Operation;
typedef struct SlapReply SlapReply; typedef struct SlapReply SlapReply;
/* end of forward declarations */ /* end of forward declarations */
#ifdef LDAP_PF_INET6
extern int slap_inet4or6; extern int slap_inet4or6;
#endif
struct OidMacro { struct OidMacro {
struct berval som_oid; struct berval som_oid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment